Skip to content

Commit

Permalink
Menu paging fix limit 1
Browse files Browse the repository at this point in the history
  • Loading branch information
Semias committed Jan 18, 2012
1 parent c1d6e35 commit 7c071ad
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion saf/lib/GUI/Pager.php
Expand Up @@ -202,7 +202,16 @@ function getInfo () {

$out['numpages'] = ceil ($this->total / $this->limit);

$out['current'] = floor ($this->offset / $this->limit) + 1;

if($this->limit == 1) {
$out['current'] = floor ($this->offset / $this->limit);
// EDIT Alex Semias 18-jan-2012, bug with limit == 1
} else {
$out['current'] = floor ($this->offset / $this->limit) + 1;
}




// remain
if ($out['next'] !== false) {
Expand Down

0 comments on commit 7c071ad

Please sign in to comment.