* Fix testtask action.

This commit is contained in:
Yagami
2018-11-19 16:00:52 +08:00
parent 7b89f7a1fc
commit 6e71947629
2 changed files with 5 additions and 4 deletions
+2 -3
View File
@@ -451,12 +451,11 @@ class testtask extends control
{
$changes = $this->testtask->update($taskID);
if(dao::isError()) die(js::error(dao::getError()));
if($changes)
if($changes or $this->post->comment)
{
$actionID = $this->loadModel('action')->create('testtask', $taskID, 'edited');
$actionID = $this->loadModel('action')->create('testtask', $taskID, 'edited', $this->post->comment);
$this->action->logHistory($actionID, $changes);
}
if($this->post->comment != '') $actionID = $this->action->create('testtask', $taskID, 'Commented', $this->post->comment);
die(js::locate(inlink('view', "taskID=$taskID"), 'parent'));
}