Skip to content

Commit

Permalink
Merge pull request #5 from juLorenzo/bugfix-pagination-nextAndPrevious
Browse files Browse the repository at this point in the history
Fixed Next and Previous Button not showing
  • Loading branch information
Marvin Kuhn authored Oct 19, 2018
2 parents a7710b4 + 6500347 commit a1d77ab
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Classes/Fusion/PaginationArrayImplementation.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,11 @@ public function evaluate()
}
// add previous and next
if ($this->paginationConfig['showNextAndPrevious']) {
if ($this->firstPage > 1 || $this->paginationConfig['alwaysShowNextAndPrevious']) {
if ($this->currentPage > 1 || $this->paginationConfig['alwaysShowNextAndPrevious']) {
$pageArray = $this->addItemToTheStartOfPageArray($pageArray, $this->currentPage - 1, 'previous');
}
if ($this->lastPage < $this->numberOfPages || $this->paginationConfig['alwaysShowNextAndPrevious']) {
if($this->currentPage < $this->numberOfPages) {
if ($this->currentPage < $this->lastPage || $this->paginationConfig['alwaysShowNextAndPrevious']) {
if ($this->currentPage < $this->numberOfPages) {
$pageArray = $this->addItemToTheEndOfPageArray($pageArray, $this->currentPage + 1, 'next');
} else {
$pageArray = $this->addItemToTheEndOfPageArray($pageArray, $this->currentPage, 'next');
Expand Down

0 comments on commit a1d77ab

Please sign in to comment.