mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #2369 from PutmanMedia/pulls/paginatedlist-getvar
Only allow positive start values in PaginatedList
This commit is contained in:
commit
cd8e643357
@ -91,8 +91,12 @@ class PaginatedList extends SS_ListDecorator {
|
|||||||
*/
|
*/
|
||||||
public function getPageStart() {
|
public function getPageStart() {
|
||||||
if ($this->pageStart === null) {
|
if ($this->pageStart === null) {
|
||||||
if ($this->request && isset($this->request[$this->getPaginationGetVar()])) {
|
if(
|
||||||
$this->pageStart = (int) $this->request[$this->getPaginationGetVar()];
|
$this->request
|
||||||
|
&& isset($this->request[$this->getPaginationGetVar()])
|
||||||
|
&& $this->request[$this->getPaginationGetVar()] > 0
|
||||||
|
) {
|
||||||
|
$this->pageStart = (int)$this->request[$this->getPaginationGetVar()];
|
||||||
} else {
|
} else {
|
||||||
$this->pageStart = 0;
|
$this->pageStart = 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user