diff options
-rw-r--r-- | app/Pagination/ProjectPagination.php | 5 | ||||
-rw-r--r-- | doc/en_US/plugin-hooks.markdown | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/app/Pagination/ProjectPagination.php b/app/Pagination/ProjectPagination.php index 8f1fa87c..563998f2 100644 --- a/app/Pagination/ProjectPagination.php +++ b/app/Pagination/ProjectPagination.php @@ -25,11 +25,14 @@ class ProjectPagination extends Base */ public function getDashboardPaginator($user_id, $method, $max) { + $query = $this->projectModel->getQueryColumnStats($this->projectPermissionModel->getActiveProjectIds($user_id)); + $this->hook->reference('pagination:dashboard:project:query', $query); + return $this->paginator ->setUrl('DashboardController', $method, array('pagination' => 'projects', 'user_id' => $user_id)) ->setMax($max) ->setOrder(ProjectModel::TABLE.'.name') - ->setQuery($this->projectModel->getQueryColumnStats($this->projectPermissionModel->getActiveProjectIds($user_id))) + ->setQuery($query) ->calculateOnlyIf($this->request->getStringParam('pagination') === 'projects'); } } diff --git a/doc/en_US/plugin-hooks.markdown b/doc/en_US/plugin-hooks.markdown index c37cf80b..54b9f689 100644 --- a/doc/en_US/plugin-hooks.markdown +++ b/doc/en_US/plugin-hooks.markdown @@ -136,6 +136,7 @@ List of reference hooks: | Hook | Description | |--------------------------------------------|---------------------------------------------------------------| | `formatter:board:query` | Alter database query before rendering board | +| `pagination:dashboard:project:query` | Alter database query for projects pagination on the dashboard | | `pagination:dashboard:task:query` | Alter database query for tasks pagination on the dashboard | | `pagination:dashboard:subtask:query` | Alter database query for subtasks pagination on the dashboard | | `model:task:creation:prepare` | Alter form values before to save a task | |