From 412cbbccc88a66a0f645d5db1bb896528ae30ebb Mon Sep 17 00:00:00 2001 From: Simon Erkelens Date: Sun, 2 Feb 2014 21:13:48 +0100 Subject: [PATCH] Don't show next for anything above TotalPages Bots often have the habit of trying a next page, even if there isn't one. Thus, using CurrentPage < TotalPages, prevents from unwanted next-links being shown. --- core/PaginatedList.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/PaginatedList.php b/core/PaginatedList.php index acb81fd71..8a27ccb91 100644 --- a/core/PaginatedList.php +++ b/core/PaginatedList.php @@ -353,7 +353,7 @@ class PaginatedList extends SS_ListDecorator { * @return bool */ public function NotLastPage() { - return $this->CurrentPage() != $this->TotalPages(); + return $this->CurrentPage() < $this->TotalPages(); } /** @@ -421,4 +421,4 @@ class PaginatedList extends SS_ListDecorator { } } -} \ No newline at end of file +}