diff options
author | friendica <info@friendica.com> | 2012-06-11 17:24:16 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-06-11 17:24:16 -0700 |
commit | 09f74be14c94c722a63371cacd7e99a2e8bd7733 (patch) | |
tree | 78844fc916bf286a17bd54294c9217c747f69ef6 /boot.php | |
parent | 3b9c3d886d0c5fcc289950a2c4aeff8457a24217 (diff) | |
download | volse-hubzilla-09f74be14c94c722a63371cacd7e99a2e8bd7733.tar.gz volse-hubzilla-09f74be14c94c722a63371cacd7e99a2e8bd7733.tar.bz2 volse-hubzilla-09f74be14c94c722a63371cacd7e99a2e8bd7733.zip |
variable confusion in poller, don't allow negative page offsets
Diffstat (limited to 'boot.php')
-rw-r--r-- | boot.php | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -432,7 +432,7 @@ if(! class_exists('App')) { * pagination */ - $this->pager['page'] = ((x($_GET,'page')) ? $_GET['page'] : 1); + $this->pager['page'] = ((x($_GET,'page') && intval($_GET['page']) > 0) ? intval($_GET['page']) : 1); $this->pager['itemspage'] = 50; $this->pager['start'] = ($this->pager['page'] * $this->pager['itemspage']) - $this->pager['itemspage']; $this->pager['total'] = 0; @@ -499,7 +499,7 @@ if(! class_exists('App')) { } function set_pager_itemspage($n) { - $this->pager['itemspage'] = intval($n); + $this->pager['itemspage'] = ((intval($n) > 0) ? intval($n) : 0); $this->pager['start'] = ($this->pager['page'] * $this->pager['itemspage']) - $this->pager['itemspage']; } |