aboutsummaryrefslogtreecommitdiffstats
path: root/boot.php
diff options
context:
space:
mode:
Diffstat (limited to 'boot.php')
-rw-r--r--boot.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/boot.php b/boot.php
index 45922f887..70dd1c426 100644
--- a/boot.php
+++ b/boot.php
@@ -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'];
}