diff options
author | Frederic Guillot <fred@kanboard.net> | 2015-05-10 15:15:58 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2015-05-10 15:15:58 -0400 |
commit | bd3c44c3d337d49b02e19da0c6baed1a4abec37b (patch) | |
tree | 95156ad897763e6739e4db582fa10a8a371ea86b /app/Model/TaskStatus.php | |
parent | c9dcd7061708114c72c0c7d80d108661308b1e50 (diff) |
Recurring tasks (#847): move hardcoded conditions to event subscriber + refactoring
Diffstat (limited to 'app/Model/TaskStatus.php')
-rw-r--r-- | app/Model/TaskStatus.php | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/app/Model/TaskStatus.php b/app/Model/TaskStatus.php index 1ae8bfeb..30a65e1e 100644 --- a/app/Model/TaskStatus.php +++ b/app/Model/TaskStatus.php @@ -89,9 +89,7 @@ class TaskStatus extends Base */ private function changeStatus($task_id, $status, $date_completed, $event) { - $task = $this->taskFinder->getById($task_id); - - if (!$task['id']) { + if (! $this->taskFinder->exists($task_id)) { return false; } @@ -109,13 +107,6 @@ class TaskStatus extends Base $event, new TaskEvent(array('task_id' => $task_id) + $this->taskFinder->getById($task_id)) ); - - if ($status == Task::STATUS_CLOSED - && $task['recurrence_status'] == Task::RECURE_STATUS_PENDING - && $task['recurrence_trigger'] == Task::RECURE_TRIGGER_CLOSE) - { - $this->taskDuplication->createRecurrence($task_id); - } } return $result; |