Make HTML paging usable.
This commit is contained in:
parent
e498e6325a
commit
3c4f4851a6
5 changed files with 36 additions and 6 deletions
10
base.php
10
base.php
|
@ -247,7 +247,9 @@ class Page
|
|||
public function isPaginated ()
|
||||
{
|
||||
global $config;
|
||||
return ($config['cops_max_item_per_page'] != -1 && $this->totalNumber != -1);
|
||||
return ($config['cops_max_item_per_page'] != -1 &&
|
||||
$this->totalNumber != -1 &&
|
||||
$this->totalNumber > $config['cops_max_item_per_page']);
|
||||
}
|
||||
|
||||
public function getNextLink ()
|
||||
|
@ -271,6 +273,12 @@ class Page
|
|||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
public function getMaxPage ()
|
||||
{
|
||||
global $config;
|
||||
return ceil ($this->totalNumber / $config['cops_max_item_per_page']);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue