FIX pagination on resources
This commit is contained in:
parent
66f6224321
commit
8781a19e0e
@ -91,15 +91,11 @@ if (empty($sortorder)) $sortorder="ASC";
|
|||||||
if (empty($sortfield)) $sortfield="t.rowid";
|
if (empty($sortfield)) $sortfield="t.rowid";
|
||||||
if (empty($arch)) $arch = 0;
|
if (empty($arch)) $arch = 0;
|
||||||
|
|
||||||
$page = GETPOST('page','int');
|
$limit = GETPOST("limit")?GETPOST("limit","int"):$conf->liste_limit;
|
||||||
if ($page == -1) {
|
$page = GETPOST("page");
|
||||||
$page = 0 ;
|
|
||||||
}
|
|
||||||
$page = is_numeric($page) ? $page : 0;
|
$page = is_numeric($page) ? $page : 0;
|
||||||
$page = $page == -1 ? 0 : $page;
|
$page = $page == -1 ? 0 : $page;
|
||||||
if (! $sortfield) $sortfield="p.ref";
|
$offset = $limit * $page ;
|
||||||
if (! $sortorder) $sortorder="ASC";
|
|
||||||
$offset = $conf->liste_limit * $page ;
|
|
||||||
$pageprev = $page - 1;
|
$pageprev = $page - 1;
|
||||||
$pagenext = $page + 1;
|
$pagenext = $page + 1;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user