diff --git a/module/execution/control.php b/module/execution/control.php index 234acba3dc..e6dc952c14 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -77,7 +77,7 @@ class execution extends control $this->loadModel('product'); /* Get executions and products info. */ - $executionID = $this->execution->saveState($executionID, $this->executions); + $executionID = $this->execution->checkAccess($executionID, $this->executions); $execution = $this->execution->getById($executionID); $products = $this->product->getProducts($executionID); $childExecutions = $this->execution->getChildExecutions($executionID); diff --git a/module/execution/model.php b/module/execution/model.php index 734bce538a..7e43506415 100755 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -322,8 +322,7 @@ class executionModel extends model } /* Save session. */ - $this->session->set('execution', $executionID, $this->app->tab); - $this->setProjectSession($executionID); + $this->executionTao->saveSession($executionID); /* Return execution id. */ return $executionID; diff --git a/module/execution/tao.php b/module/execution/tao.php new file mode 100644 index 0000000000..6939bec107 --- /dev/null +++ b/module/execution/tao.php @@ -0,0 +1,27 @@ + + * @package execution + * @link https://www.zentao.net + */ +class executionTao extends executionModel +{ + /** + * 将执行ID保存到session中。 + * Save the execution ID to the session. + * + * @param int $executionID + * @access protected + * @return void + */ + protected function saveSession(int $executionID): void + { + $this->session->set('execution', $executionID, $this->app->tab); + $this->setProjectSession($executionID); + } +}