From 44f5223c90325c330182e12800598e553da4a221 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 5 Feb 2019 18:54:38 +0100 Subject: [PATCH] Remove warning --- htdocs/admin/tools/export.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/admin/tools/export.php b/htdocs/admin/tools/export.php index 6b0ea790ab2..5bfacc6c4f0 100644 --- a/htdocs/admin/tools/export.php +++ b/htdocs/admin/tools/export.php @@ -35,14 +35,15 @@ $what=GETPOST('what','alpha'); $export_type=GETPOST('export_type','alpha'); $file=GETPOST('filename_template','alpha'); +// Load variable for pagination +$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit; $sortfield = GETPOST('sortfield','alpha'); $sortorder = GETPOST('sortorder','alpha'); $page = GETPOST("page",'int'); +if (empty($page) || $page == -1 || GETPOST('button_search','alpha') || GETPOST('button_removefilter','alpha') || (empty($toselect) && $massaction === '0')) { $page = 0; } // If $page is not defined, or '' or -1 or if we click on clear filters or if we select empty mass action +$offset = $limit * $page; if (! $sortorder) $sortorder="DESC"; if (! $sortfield) $sortfield="date"; -if ($page < 0) { $page = 0; } -$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit; -$offset = $limit * $page; if (! $user->admin) accessforbidden();