This commit is contained in:
wangyidong
2017-11-30 09:25:22 +08:00
parent 33415b566b
commit 76ea4b62e5

View File

@@ -382,20 +382,7 @@ class taskModel extends model
} }
} }
if($task->consumed < $oldTask->consumed) if($task->consumed < $oldTask->consumed) die(js::error($this->lang->task->error->consumedSmall));
{
die(js::error($this->lang->task->error->consumedSmall));
}
elseif($task->consumed != $oldTask->consumed or $task->left != $oldTask->left)
{
$estimate = new stdClass();
$estimate->consumed = $task->consumed - $oldTask->consumed;
$estimate->left = $task->left;
$estimate->task = $taskID;
$estimate->account = $this->app->user->account;
$estimate->date = helper::now();
$this->addTaskEstimate($estimate);
}
$task = $this->loadModel('file')->processImgURL($task, $this->config->task->editor->edit['id'], $this->post->uid); $task = $this->loadModel('file')->processImgURL($task, $this->config->task->editor->edit['id'], $this->post->uid);
$this->dao->update(TABLE_TASK)->data($task) $this->dao->update(TABLE_TASK)->data($task)