diff options
author | CoRex <dev@corex.dk> | 2017-12-02 00:56:45 +0100 |
---|---|---|
committer | fguillot <fred@kanboard.net> | 2017-12-04 10:35:20 -0800 |
commit | 7da4c943b86fcd56bc7f5940ce0753539d3432df (patch) | |
tree | c2337fee520bf93b11abbe30221911b82dc96670 | |
parent | b4c08345113ca363ecab012f51bfafb9e808702e (diff) |
Added 'pagination:dashboard:task:query' to DashboardPagination.
-rw-r--r-- | app/Pagination/DashboardPagination.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/Pagination/DashboardPagination.php b/app/Pagination/DashboardPagination.php index b8fc4434..0149a42b 100644 --- a/app/Pagination/DashboardPagination.php +++ b/app/Pagination/DashboardPagination.php @@ -27,13 +27,17 @@ class DashboardPagination extends Base $projects = $this->projectUserRoleModel->getActiveProjectsByUser($userId); foreach ($projects as $projectId => $projectName) { + + $query = $this->taskFinderModel->getUserQuery($userId)->eq(ProjectModel::TABLE.'.id', $projectId); + $this->hook->reference('pagination:dashboard:task:query', $query); + $paginator = $this->paginator ->setUrl('DashboardController', 'show', array('user_id' => $userId)) ->setMax(50) ->setOrder(TaskModel::TABLE.'.priority') ->setDirection('DESC') ->setFormatter($this->taskListSubtaskAssigneeFormatter->withUserId($userId)) - ->setQuery($this->taskFinderModel->getUserQuery($userId)->eq(ProjectModel::TABLE.'.id', $projectId)) + ->setQuery($query) ->calculate(); if ($paginator->getTotal() > 0) { |