diff --git a/htdocs/compta/bank/various_payment/list.php b/htdocs/compta/bank/various_payment/list.php
index e2aa6517417..b8581151599 100644
--- a/htdocs/compta/bank/various_payment/list.php
+++ b/htdocs/compta/bank/various_payment/list.php
@@ -58,7 +58,7 @@ $sortfield = GETPOST("sortfield", 'alpha');
$sortorder = GETPOST("sortorder", 'alpha');
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
-$offset = $conf->liste_limit * $page;
+$offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
if (!$sortfield) $sortfield = "v.datep,v.rowid";
@@ -178,9 +178,8 @@ if ($result)
print '';
print '';
print '';
- print '';
- print_barre_liste($langs->trans("VariousPayments"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, 'invoicing', 0, $newcardbutton, '', $limit);
+ print_barre_liste($langs->trans("VariousPayments"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, 'invoicing', 0, $newcardbutton, '', $limit, 0, 0, 1);
print '
';
print '
'."\n";
diff --git a/htdocs/salaries/list.php b/htdocs/salaries/list.php
index 259547ae8ff..c92ee53fd38 100644
--- a/htdocs/salaries/list.php
+++ b/htdocs/salaries/list.php
@@ -49,16 +49,16 @@ $sortfield = GETPOST("sortfield", 'alpha');
$sortorder = GETPOST("sortorder", 'alpha');
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
-$offset = $conf->liste_limit * $page;
+$offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
if (!$sortfield) $sortfield = "s.datep,s.rowid";
if (!$sortorder) $sortorder = "DESC,DESC";
$optioncss = GETPOST('optioncss', 'alpha');
-$filtre = $_GET["filtre"];
+$filtre = GETPOST("filtre", 'none');
-if (empty($_REQUEST['typeid']))
+if (! GETPOST('typeid', 'int'))
{
$newfiltre = str_replace('filtre=', '', $filtre);
$filterarray = explode('-', $newfiltre);
@@ -70,7 +70,7 @@ if (empty($_REQUEST['typeid']))
}
else
{
- $typeid = $_REQUEST['typeid'];
+ $typeid = GETPOST('typeid', 'int');
}
@@ -141,6 +141,7 @@ if ($result)
}
$sql .= $db->plimit($limit + 1, $offset);
+
$result = $db->query($sql);
if ($result)
{
@@ -167,9 +168,8 @@ if ($result)
print '';
print '';
print '';
- print '';
- print_barre_liste($langs->trans("SalariesPayments"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, 'title_accountancy.png', 0, $newcardbutton, '', $limit);
+ print_barre_liste($langs->trans("SalariesPayments"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, 'title_accountancy.png', 0, $newcardbutton, '', $limit, 0, 0, 1);
print '