Skip to content

Commit a1d77ab

Browse files
author
Marvin Kuhn
authored
Merge pull request #5 from juLorenzo/bugfix-pagination-nextAndPrevious
Fixed Next and Previous Button not showing
2 parents a7710b4 + 6500347 commit a1d77ab

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Classes/Fusion/PaginationArrayImplementation.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,11 @@ public function evaluate()
143143
}
144144
// add previous and next
145145
if ($this->paginationConfig['showNextAndPrevious']) {
146-
if ($this->firstPage > 1 || $this->paginationConfig['alwaysShowNextAndPrevious']) {
146+
if ($this->currentPage > 1 || $this->paginationConfig['alwaysShowNextAndPrevious']) {
147147
$pageArray = $this->addItemToTheStartOfPageArray($pageArray, $this->currentPage - 1, 'previous');
148148
}
149-
if ($this->lastPage < $this->numberOfPages || $this->paginationConfig['alwaysShowNextAndPrevious']) {
150-
if($this->currentPage < $this->numberOfPages) {
149+
if ($this->currentPage < $this->lastPage || $this->paginationConfig['alwaysShowNextAndPrevious']) {
150+
if ($this->currentPage < $this->numberOfPages) {
151151
$pageArray = $this->addItemToTheEndOfPageArray($pageArray, $this->currentPage + 1, 'next');
152152
} else {
153153
$pageArray = $this->addItemToTheEndOfPageArray($pageArray, $this->currentPage, 'next');

0 commit comments

Comments
 (0)