* Fix bug #3669.
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user