This commit is contained in:
tianshujie98
2020-12-02 09:50:36 +08:00
parent fc1d7e4d3b
commit 48fb4f32e9
2 changed files with 3 additions and 1 deletions
+2 -1
View File
@@ -1020,9 +1020,10 @@ class task extends control
{
$this->loadModel('action');
$changes = $this->task->close($taskID);
if(dao::isError()) die(js::error(dao::getError()));
if($this->post->comment != '' or !empty($changes))
if(!empty($changes))
{
$actionID = $this->action->create('task', $taskID, 'Closed', $this->post->comment);
$this->action->logHistory($actionID, $changes);
+1
View File
@@ -1679,6 +1679,7 @@ class taskModel extends model
public function close($taskID)
{
$oldTask = $this->dao->select('*')->from(TABLE_TASK)->where('id')->eq($taskID)->fetch();
if($oldTask->status == 'closed') return;
$now = helper::now();
$task = fixer::input('post')