mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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.
This commit is contained in:
parent
a0f6329dc4
commit
412cbbccc8
@ -353,7 +353,7 @@ class PaginatedList extends SS_ListDecorator {
|
||||
* @return bool
|
||||
*/
|
||||
public function NotLastPage() {
|
||||
return $this->CurrentPage() != $this->TotalPages();
|
||||
return $this->CurrentPage() < $this->TotalPages();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user