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:
Simon Erkelens 2014-02-02 21:13:48 +01:00
parent a0f6329dc4
commit 412cbbccc8

View File

@ -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 {
}
}
}
}