From 5e0354467d679f8a88a2deef52a7a039e22e1f2a Mon Sep 17 00:00:00 2001 From: Enes Erk Date: Tue, 8 Feb 2022 10:12:48 +0100 Subject: [PATCH] FIX: Last page is not shown everytime If the "..." displayed before the last page number, the last page number was not displayed when you are on the page where the "..." disappears. Check if the `displayRangeEnd + 1` matches the number of pages, if so add the last page number then to the `links`-array Resolves: #41 --- Classes/Fusion/PaginationArrayImplementation.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Classes/Fusion/PaginationArrayImplementation.php b/Classes/Fusion/PaginationArrayImplementation.php index c7642f4..a64acfa 100644 --- a/Classes/Fusion/PaginationArrayImplementation.php +++ b/Classes/Fusion/PaginationArrayImplementation.php @@ -42,6 +42,8 @@ public function evaluate(): array if ($displayRangeEnd + 1 < $numberOfPages) { $links[] = '...'; $links[] = $numberOfPages; + } else if ($displayRangeEnd + 1 == $numberOfPages) { + $links[] = $numberOfPages; } if ($showPreviousNextLinks) {