Move some Task model methods to the TaskFinder class
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user