summaryrefslogtreecommitdiff
path: root/app/Controller/Analytic.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-04-09 22:42:17 -0400
committerFrederic Guillot <fred@kanboard.net>2016-04-09 22:42:17 -0400
commit11858be4e8d5aba983700c6cba1c4d0a33ea8e9d (patch)
tree38427e86d52185df95e2b891e4bcd50aeb56eeb9 /app/Controller/Analytic.php
parent42813d702d1c3e5659301bc771f8dbb37a6d15cd (diff)
Filter refactoring
Diffstat (limited to 'app/Controller/Analytic.php')
-rw-r--r--app/Controller/Analytic.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/app/Controller/Analytic.php b/app/Controller/Analytic.php
index 6b0730b0..35bc3048 100644
--- a/app/Controller/Analytic.php
+++ b/app/Controller/Analytic.php
@@ -2,6 +2,7 @@
namespace Kanboard\Controller;
+use Kanboard\Filter\TaskProjectFilter;
use Kanboard\Model\Task as TaskModel;
/**
@@ -44,13 +45,15 @@ class Analytic extends Base
public function compareHours()
{
$project = $this->getProject();
- $query = $this->taskFilter->create()->filterByProject($project['id'])->getQuery();
$paginator = $this->paginator
->setUrl('analytic', 'compareHours', array('project_id' => $project['id']))
->setMax(30)
->setOrder(TaskModel::TABLE.'.id')
- ->setQuery($query)
+ ->setQuery($this->taskQuery
+ ->withFilter(new TaskProjectFilter($project['id']))
+ ->getQuery()
+ )
->calculate();
$this->response->html($this->helper->layout->analytic('analytic/compare_hours', array(