Fix limit management
This commit is contained in:
parent
0d9a86db3f
commit
abcbc5c0da
@ -62,6 +62,17 @@ $orderid = GETPOST('orderid');
|
|||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'fournisseur', $orderid, '', 'commande');
|
$result = restrictedArea($user, 'fournisseur', $orderid, '', 'commande');
|
||||||
|
|
||||||
|
$limit = GETPOST("limit")?GETPOST("limit","int"):$conf->liste_limit;
|
||||||
|
$sortfield = GETPOST("sortfield",'alpha');
|
||||||
|
$sortorder = GETPOST("sortorder",'alpha');
|
||||||
|
$page = GETPOST("page",'int');
|
||||||
|
if ($page == -1) { $page = 0; }
|
||||||
|
$offset = $limit * $page;
|
||||||
|
$pageprev = $page - 1;
|
||||||
|
$pagenext = $page + 1;
|
||||||
|
if (! $sortfield) $sortfield='cf.ref';
|
||||||
|
if (! $sortorder) $sortorder='DESC';
|
||||||
|
|
||||||
// Purge search criteria
|
// Purge search criteria
|
||||||
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers
|
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user