diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-07-19 22:38:30 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-07-19 22:38:30 -0400 |
commit | 390082aa41cb81610089163b1cc3a256f3b3c513 (patch) | |
tree | 1ada3964702ee536fe1486f34230f8e30a95d82e /app/Model/TaskProjectMoveModel.php | |
parent | d9d37882228771bca0c7f53f5ffcef90ba7ac1c5 (diff) |
Refactoring of internal task events
Diffstat (limited to 'app/Model/TaskProjectMoveModel.php')
-rw-r--r-- | app/Model/TaskProjectMoveModel.php | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/app/Model/TaskProjectMoveModel.php b/app/Model/TaskProjectMoveModel.php index eda23c0b..ae3ae084 100644 --- a/app/Model/TaskProjectMoveModel.php +++ b/app/Model/TaskProjectMoveModel.php @@ -2,8 +2,6 @@ namespace Kanboard\Model; -use Kanboard\Event\TaskEvent; - /** * Task Project Move * @@ -32,9 +30,8 @@ class TaskProjectMoveModel extends TaskDuplicationModel $this->checkDestinationProjectValues($values); $this->tagDuplicationModel->syncTaskTagsToAnotherProject($task_id, $project_id); - if ($this->db->table(TaskModel::TABLE)->eq('id', $task['id'])->update($values)) { - $event = new TaskEvent(array_merge($task, $values, array('task_id' => $task['id']))); - $this->dispatcher->dispatch(TaskModel::EVENT_MOVE_PROJECT, $event); + if ($this->db->table(TaskModel::TABLE)->eq('id', $task_id)->update($values)) { + $this->queueManager->push($this->taskEventJob->withParams($task_id, array(TaskModel::EVENT_MOVE_PROJECT), $values)); } return true; |