From 4061927d215c846ff8eb196301bf61532018042b Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Sun, 12 Oct 2014 15:32:35 -0400 Subject: Move some Task model methods to the TaskFinder class --- app/Controller/Base.php | 2 +- app/Controller/Project.php | 2 +- app/Controller/Task.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'app/Controller') diff --git a/app/Controller/Base.php b/app/Controller/Base.php index 9fab0752..ac88df04 100644 --- a/app/Controller/Base.php +++ b/app/Controller/Base.php @@ -276,7 +276,7 @@ abstract class Base */ protected function getTask() { - $task = $this->task->getDetails($this->request->getIntegerParam('task_id')); + $task = $this->taskFinder->getDetails($this->request->getIntegerParam('task_id')); if (! $task) { $this->notfound(); diff --git a/app/Controller/Project.php b/app/Controller/Project.php index f998e5d6..39d8d1b0 100644 --- a/app/Controller/Project.php +++ b/app/Controller/Project.php @@ -447,7 +447,7 @@ class Project extends Base $limit = 25; $tasks = $this->taskFinder->getClosedTasks($project['id'], $offset, $limit, $order, $direction); - $nb_tasks = $this->task->countByProjectId($project['id'], array(TaskModel::STATUS_CLOSED)); + $nb_tasks = $this->taskFinder->countByProjectId($project['id'], array(TaskModel::STATUS_CLOSED)); $this->response->html($this->template->layout('project_tasks', array( 'pagination' => array( diff --git a/app/Controller/Task.php b/app/Controller/Task.php index 4c15d8df..1b20cf15 100644 --- a/app/Controller/Task.php +++ b/app/Controller/Task.php @@ -26,7 +26,7 @@ class Task extends Base $this->forbidden(true); } - $task = $this->task->getDetails($this->request->getIntegerParam('task_id')); + $task = $this->taskFinder->getDetails($this->request->getIntegerParam('task_id')); if (! $task) { $this->notfound(true); -- cgit v1.2.3