* Move post data from model to control.

This commit is contained in:
dingguodong
2023-09-13 09:01:35 +08:00
parent 1159edfaaf
commit d3ef858ade
2 changed files with 25 additions and 23 deletions
+12 -1
View File
@@ -1362,7 +1362,18 @@ class execution extends control
if(!empty($_POST))
{
$this->execution->activate($executionID);
$postData = fixer::input('post')
->add('id', $executionID)
->setDefault('realEnd', null)
->setDefault('status', 'doing')
->setDefault('lastEditedBy', $this->app->user->account)
->setDefault('lastEditedDate', helper::now())
->setDefault('closedBy', '')
->setDefault('closedDate', null)
->stripTags($this->config->execution->editor->activate['id'], $this->config->allowedTags)
->get();
$this->execution->activate($executionID, $postData);
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
$project = $this->loadModel('project')->getById($execution->project);