From 8fd3d9375ddb955fcdf21c965c4cc642be083ebc Mon Sep 17 00:00:00 2001 From: simnandez Date: Thu, 21 Feb 2013 14:29:06 +0100 Subject: [PATCH 1/2] Fix: Pagination at bottom not work correctly with filters applied --- htdocs/product/liste.php | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/htdocs/product/liste.php b/htdocs/product/liste.php index f5e6581d804..1a7cba82d68 100644 --- a/htdocs/product/liste.php +++ b/htdocs/product/liste.php @@ -442,18 +442,12 @@ else $i++; } - if ($num > $conf->liste_limit) - { - if ($sref || $snom || $sall || $sbarcode || GETPOST('search')) - { - print_barre_liste('', $page, "liste.php", "&sref=".$sref."&snom=".$snom."&sall=".$sall."&tosell=".$tosell."&tobuy=".$tobuy, $sortfield, $sortorder,'',$num); - } - else - { - print_barre_liste('', $page, "liste.php", "&sref=$sref&snom=$snom&fourn_id=$fourn_id".(isset($type)?"&type=$type":"")."&tosell=".$tosell."&tobuy=".$tobuy, $sortfield, $sortorder,'',$num); - } - } - + $param="&sref=".$sref.($sbarcode?"&sbarcode=".$sbarcode:"")."&snom=".$snom."&sall=".$sall."&tosell=".$tosell."&tobuy=".$tobuy; + $param.=($fourn_id?"&fourn_id=".$fourn_id:""); + $param.=($search_categ?"&search_categ=".$search_categ:""); + $param.=isset($type)?"&type=".$type:""; + print_barre_liste('', $page, "liste.php", $param, $sortfield, $sortorder,'',$num); + $db->free($resql); print ""; From e1683f5f2209ff0eb2432ec790d34860e1a6d5a5 Mon Sep 17 00:00:00 2001 From: simnandez Date: Fri, 22 Feb 2013 08:57:28 +0100 Subject: [PATCH 2/2] Fix: Pagination at bottom not work correctly with filters applied --- htdocs/product/liste.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/product/liste.php b/htdocs/product/liste.php index 1a7cba82d68..bef33a022b1 100644 --- a/htdocs/product/liste.php +++ b/htdocs/product/liste.php @@ -3,6 +3,7 @@ * Copyright (C) 2004-2011 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2012 Marcos GarcĂ­a + * Copyright (C) 2013 Juanjo Menent * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by