From 2f315c61d4ec8f9fc05b40d99d164ecf61d2972f Mon Sep 17 00:00:00 2001 From: Sherif Salah Date: Mon, 31 Aug 2020 06:09:34 +0200 Subject: [PATCH] fix getNext and getPrevious links changed getPrevious to current - 1 to get previous page instead of first -1 that gets first page. same in getNext. --- system/Pager/PagerRenderer.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/system/Pager/PagerRenderer.php b/system/Pager/PagerRenderer.php index 1e5ea901e3d2..f19acca63606 100644 --- a/system/Pager/PagerRenderer.php +++ b/system/Pager/PagerRenderer.php @@ -171,11 +171,11 @@ public function getPrevious() if ($this->segment === 0) { - $uri->addQuery($this->pageSelector, $this->first - 1); + $uri->addQuery($this->pageSelector, $this->current - 1); } else { - $uri->setSegment($this->segment, $this->first - 1); + $uri->setSegment($this->segment, $this->current - 1); } return (string) $uri; @@ -215,11 +215,11 @@ public function getNext() if ($this->segment === 0) { - $uri->addQuery($this->pageSelector, $this->last + 1); + $uri->addQuery($this->pageSelector, $this->current + 1); } else { - $uri->setSegment($this->segment, $this->last + 1); + $uri->setSegment($this->segment, $this->current + 1); } return (string) $uri;