* code for task #55568.

This commit is contained in:
wangyidong
2022-06-01 14:48:35 +08:00
parent 6f5689de1a
commit 2400dfc83a
8 changed files with 83 additions and 4 deletions
+10
View File
@@ -815,9 +815,11 @@ class executionModel extends model
->setDefault('status', 'doing')
->setDefault('lastEditedBy', $this->app->user->account)
->setDefault('lastEditedDate', $now)
->stripTags($this->config->execution->editor->start['id'], $this->config->allowedTags)
->remove('comment')
->get();
$execution = $this->loadModel('file')->processImgURL($execution, $this->config->execution->editor->start['id'], $this->post->uid);
$this->dao->update(TABLE_EXECUTION)->data($execution)
->autoCheck()
->check($this->config->execution->start->requiredFields, 'notempty')
@@ -846,6 +848,7 @@ class executionModel extends model
$execution = fixer::input('post')
->add('id', $executionID)
->stripTags($this->config->execution->editor->putoff['id'], $this->config->allowedTags)
->setDefault('lastEditedBy', $this->app->user->account)
->setDefault('lastEditedDate', $now)
->remove('comment')
@@ -854,6 +857,7 @@ class executionModel extends model
if($this->config->systemMode == 'new') $this->checkBeginAndEndDate($oldExecution->project, $execution->begin, $execution->end);
if(dao::isError()) return false;
$execution = $this->loadModel('file')->processImgURL($execution, $this->config->execution->editor->putoff['id'], $this->post->uid);
$this->dao->update(TABLE_EXECUTION)->data($execution)
->autoCheck()
->checkFlow()
@@ -881,8 +885,10 @@ class executionModel extends model
->setDefault('lastEditedBy', $this->app->user->account)
->setDefault('lastEditedDate', $now)
->setDefault('suspendedDate', helper::today())
->stripTags($this->config->execution->editor->suspend['id'], $this->config->allowedTags)
->remove('comment')->get();
$execution = $this->loadModel('file')->processImgURL($execution, $this->config->execution->editor->suspend['id'], $this->post->uid);
$this->dao->update(TABLE_EXECUTION)->data($execution)
->autoCheck()
->checkFlow()
@@ -910,6 +916,7 @@ class executionModel extends model
->setDefault('status', 'doing')
->setDefault('lastEditedBy', $this->app->user->account)
->setDefault('lastEditedDate', $now)
->stripTags($this->config->execution->editor->activate['id'], $this->config->allowedTags)
->remove('comment,readjustTime,readjustTask')
->get();
@@ -919,6 +926,7 @@ class executionModel extends model
unset($execution->end);
}
$execution = $this->loadModel('file')->processImgURL($execution, $this->config->execution->editor->activate['id'], $this->post->uid);
$this->dao->update(TABLE_EXECUTION)->data($execution)
->autoCheck()
->checkFlow()
@@ -992,11 +1000,13 @@ class executionModel extends model
->setDefault('closedDate', $now)
->setDefault('lastEditedBy', $this->app->user->account)
->setDefault('lastEditedDate', $now)
->stripTags($this->config->execution->editor->close['id'], $this->config->allowedTags)
->remove('comment')
->get();
$this->lang->error->ge = $this->lang->execution->ge;
$execution = $this->loadModel('file')->processImgURL($execution, $this->config->execution->editor->close['id'], $this->post->uid);
$this->dao->update(TABLE_EXECUTION)->data($execution)
->autoCheck()
->check($this->config->execution->close->requiredFields,'notempty')