summaryrefslogtreecommitdiff
path: root/app/Pagination
diff options
context:
space:
mode:
authorCoRex <dev@corex.dk>2017-12-02 00:56:45 +0100
committerfguillot <fred@kanboard.net>2017-12-04 10:35:20 -0800
commit7da4c943b86fcd56bc7f5940ce0753539d3432df (patch)
treec2337fee520bf93b11abbe30221911b82dc96670 /app/Pagination
parentb4c08345113ca363ecab012f51bfafb9e808702e (diff)
Added 'pagination:dashboard:task:query' to DashboardPagination.
Diffstat (limited to 'app/Pagination')
-rw-r--r--app/Pagination/DashboardPagination.php6
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) {