* don't log actions if no changes.
This commit is contained in:
@@ -150,8 +150,11 @@ class testtask extends control
|
||||
{
|
||||
$changes = $this->testtask->update($taskID);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
$actionID = $this->loadModel('action')->create('testtask', $taskID, 'edited');
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
if($changes)
|
||||
{
|
||||
$actionID = $this->loadModel('action')->create('testtask', $taskID, 'edited');
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
die(js::locate(inlink('view', "taskID=$taskID"), 'parent'));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user