* Fix error of edit instance.

This commit is contained in:
zhaoke
2023-08-02 14:45:45 +08:00
parent 74a180193e
commit ee30913246
7 changed files with 19 additions and 13 deletions
+3 -2
View File
@@ -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;