+ code for task#754

This commit is contained in:
chencongzhi520@gmail.com
2012-04-22 07:10:16 +00:00
parent 6bbb9f2346
commit 1e0b3905dd
2 changed files with 11 additions and 5 deletions
+7 -5
View File
@@ -215,11 +215,13 @@ class taskModel extends model
{
$now = helper::now();
$oldTask = $this->getById($taskID);
$this->dao->update(TABLE_TASK)
->set('assignedTo')->eq($this->post->assignedTo)
->set('lastEditedBy')->eq($this->app->user->account)
->set('lastEditedDate')->eq($now)
->where('id')->eq($taskID)->exec();
$task = fixer::input('post')
->setDefault('lastEditedBy', $this->app->user->account)
->setDefault('lastEditedDate', $now)
->remove('comment')
->get();
$this->dao->update(TABLE_TASK)->data($task) ->where('id')->eq($taskID)->exec();
$actionID = $this->loadModel('action')->create('task', $taskID, 'Assigned', $this->post->comment, $this->post->assignedTo);
$this->dao->insert(TABLE_HISTORY)