Skip to content
Snippets Groups Projects
Verified Commit 8b1e02bc authored by Kevin Ditscheid's avatar Kevin Ditscheid
Browse files

[BUGFIX] Remove sg-account Pagination class and fix the pagination

parent b5c29cc8
No related branches found
No related tags found
1 merge request!52Feature 5168 unify root page selector
...@@ -118,28 +118,11 @@ class BackendController extends ActionController { ...@@ -118,28 +118,11 @@ class BackendController extends ActionController {
?? $backendUser->getModuleData('itemsPerPage', 'ses') // Retrieve from session if available ?? $backendUser->getModuleData('itemsPerPage', 'ses') // Retrieve from session if available
?? 10 ?? 10
); );
// Store itemsPerPage in the session
$backendUser->pushModuleData('itemsPerPage', $itemsPerPage);
// Ensure at least 1 item per page // Ensure at least 1 item per page
$itemsPerPage = max($itemsPerPage, 1); $itemsPerPage = max($itemsPerPage, 1);
// Create the query builder // Store itemsPerPage in the session
$usersQueryBuilder = $this->frontendUserRepository->getUsersByPidForBackendList( $backendUser->pushModuleData('itemsPerPage', $itemsPerPage);
$pageUid,
$filters,
$itemsPerPage
);
// 🛠 Recreate Pagination with updated values
$pagination = GeneralUtility::makeInstance(
Pagination::class,
$usersQueryBuilder,
$currentPage,
$itemsPerPage
);
$this->moduleTemplate->assign('pagination', $pagination);
// create docheader + buttons // create docheader + buttons
$pageInfo = BackendUtility::readPageAccess($pageUid, $GLOBALS['BE_USER']->getPagePermsClause(1)); $pageInfo = BackendUtility::readPageAccess($pageUid, $GLOBALS['BE_USER']->getPagePermsClause(1));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment