* Optimize code.

This commit is contained in:
liumengyi
2022-07-25 13:44:04 +08:00
parent c12d5d1da6
commit 13991e6250
+3 -4
View File
@@ -1820,10 +1820,7 @@ class execution extends control
if($_POST['status'] == 'doing') $this->loadModel('common')->syncPPEStatus($executionID);
/* If link from no head then reload. */
if(isonlybody())
{
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent'));
}
if(isonlybody()) return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent'));
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('view', "executionID=$executionID")));
}
@@ -2272,6 +2269,8 @@ class execution extends control
$type = $this->config->vision == 'lite' ? 'kanban' : 'stage,sprint,kanban';
if(empty($execution) || strpos($type, $execution->type) === false) return print(js::error($this->lang->notFound) . js::locate('back'));
if($execution->type == 'kanban' and defined('RUN_MODE') and RUN_MODE == 'api') return print($this->fetch('execution', 'kanban', "executionID=$executionID"));
$this->app->loadLang('program');
/* Execution not found to prevent searching for .*/