diff --git a/Classes/Controller/ModuleController.php b/Classes/Controller/ModuleController.php index af7e76e16..7efa72a4f 100644 --- a/Classes/Controller/ModuleController.php +++ b/Classes/Controller/ModuleController.php @@ -93,13 +93,8 @@ public function listAction(): ResponseInterface $formUids = $this->mailRepository->findGroupedFormUidsToGivenPageUid((int)$this->id); $mails = $this->mailRepository->findAllInPid((int)$this->id, $this->settings, $this->piVars); - $currentPage = 1; - if ($this->request->hasArgument('tx_powermail_web_powermailm1')) { - $moduleArguments = $this->request->getArgument('tx_powermail_web_powermailm1'); - if (array_key_exists('currentPage', $moduleArguments)) { - $currentPage = (int)$moduleArguments['currentPage']; - } - } + $currentPage = (int)($this->request->getQueryParams()['currentPage'] ?? 1); + $currentPage = $currentPage > 0 ? $currentPage : 1; $itemsPerPage = (int)($this->settings['perPage'] ?? 10); $paginator = GeneralUtility::makeInstance(QueryResultPaginator::class, $mails, $currentPage, $itemsPerPage); diff --git a/Resources/Private/Partials/Module/Pagination.html b/Resources/Private/Partials/Module/Pagination.html index c09eec84b..a85d2429e 100644 --- a/Resources/Private/Partials/Module/Pagination.html +++ b/Resources/Private/Partials/Module/Pagination.html @@ -1,39 +1,93 @@