* Fix error of edit instance.
This commit is contained in:
@@ -120,7 +120,8 @@ class gogs extends control
|
||||
|
||||
if($_POST)
|
||||
{
|
||||
$this->checkToken();
|
||||
$gogs = fixer::input('post')->trim('url,token')->get();
|
||||
$this->checkToken($gogs);
|
||||
$this->gogs->update($gogsID);
|
||||
$gogs = $this->gogs->getByID($gogsID);
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
@@ -129,7 +130,7 @@ class gogs extends control
|
||||
$actionID = $this->action->create('gogs', $gogsID, 'edited');
|
||||
$changes = common::createChanges($oldGogs, $gogs);
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('browse')));
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'load' => true, 'closeModal' => true));
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->gogs->common . $this->lang->colon . $this->lang->gogs->edit;
|
||||
|
||||
Reference in New Issue
Block a user