From b6fd197901b3d6dcf315f33c0da52a219bbca570 Mon Sep 17 00:00:00 2001 From: tianshujie98 Date: Wed, 16 Dec 2020 15:35:46 +0800 Subject: [PATCH] * Finish task #8669. --- module/task/control.php | 3 +-- module/task/model.php | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/module/task/control.php b/module/task/control.php index 9d4b746cd9..2663041af8 100644 --- a/module/task/control.php +++ b/module/task/control.php @@ -1030,8 +1030,7 @@ class task extends control if($this->post->comment != '' or !empty($changes)) { - $action = (!empty($changes)) ? 'Closed' : 'Commented'; - $actionID = $this->action->create('task', $taskID, $action, $this->post->comment); + $actionID = $this->action->create('task', $taskID, 'Closed', $this->post->comment); $this->action->logHistory($actionID, $changes); } diff --git a/module/task/model.php b/module/task/model.php index a3ab5f997a..402c941be6 100644 --- a/module/task/model.php +++ b/module/task/model.php @@ -1689,7 +1689,6 @@ 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 array(); $now = helper::now(); $task = fixer::input('post')