diff --git a/dev/skeletons/skeleton_list.php b/dev/skeletons/skeleton_list.php index 0ca4d6f858987df74693bd58d2dfc5069db94c46..77485c6d6381f8c0875e5288125621679be0e443 100644 --- a/dev/skeletons/skeleton_list.php +++ b/dev/skeletons/skeleton_list.php @@ -247,7 +247,7 @@ $sql.=$db->order($sortfield,$sortorder); //$sql.= $db->plimit($conf->liste_limit+1, $offset); // Count total nb of records -$nbtotalofrecords = -1; +$nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); diff --git a/htdocs/accountancy/admin/account.php b/htdocs/accountancy/admin/account.php index 47dcce5031b75abeffd687988610dda3e7e1fc6b..e82522df26f7d6c198c2291e1cd339c0e1f74a63 100644 --- a/htdocs/accountancy/admin/account.php +++ b/htdocs/accountancy/admin/account.php @@ -172,7 +172,7 @@ if (strlen(trim($search_pcgsubtype))) { $sql .= $db->order($sortfield, $sortorder); // Count total nb of records -$nbtotalofrecords = -1; +$nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $resql = $db->query($sql); diff --git a/htdocs/accountancy/admin/fiscalyear.php b/htdocs/accountancy/admin/fiscalyear.php index c5a1bffc694c79781c9f1c1269f97e7143976395..817905f7b56e938b2bbb61d2dac2b27362c5f0fb 100644 --- a/htdocs/accountancy/admin/fiscalyear.php +++ b/htdocs/accountancy/admin/fiscalyear.php @@ -90,7 +90,7 @@ $sql .= " WHERE f.entity = " . $conf->entity; $sql.=$db->order($sortfield,$sortorder); // Count total nb of records -$nbtotalofrecords = -1; +$nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); diff --git a/htdocs/accountancy/admin/productaccount.php b/htdocs/accountancy/admin/productaccount.php index 69d0fdc7f94aee354ee8eeaf5bb3364bc4215dd1..cae9295229b4c091efca16ca72c22f98d7d546fc 100644 --- a/htdocs/accountancy/admin/productaccount.php +++ b/htdocs/accountancy/admin/productaccount.php @@ -248,7 +248,7 @@ if (strlen(trim($search_desc))) { } $sql .= $db->order($sortfield, $sortorder); -$nbtotalofrecords = -1; +$nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); diff --git a/htdocs/accountancy/bookkeeping/balance.php b/htdocs/accountancy/bookkeeping/balance.php index 5e2894eb11f4527bc6707ee91ef89b1cf00b0cc4..15345a99b72a3178e95456feef862d1aaa084488 100644 --- a/htdocs/accountancy/bookkeeping/balance.php +++ b/htdocs/accountancy/bookkeeping/balance.php @@ -143,7 +143,7 @@ else { // List - $nbtotalofrecords = -1; + $nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $nbtotalofrecords = $object->fetchAllBalance($sortorder, $sortfield, 0, 0, $filter); if ($nbtotalofrecords < 0) { diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php index c884c0ae3a82832147982b4b0aef6c01ed63467b..56cae24cf76c8e890344ea9b7f161ae2462faa1e 100644 --- a/htdocs/accountancy/bookkeeping/list.php +++ b/htdocs/accountancy/bookkeeping/list.php @@ -293,7 +293,7 @@ llxHeader('', $title_page); // List -$nbtotalofrecords = -1; +$nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $nbtotalofrecords = $object->fetchAll($sortorder, $sortfield, 0, 0, $filter); if ($nbtotalofrecords < 0) { diff --git a/htdocs/accountancy/bookkeeping/listbyaccount.php b/htdocs/accountancy/bookkeeping/listbyaccount.php index ca6a3657774736cd748fc35a76b41d07bf93bcb0..61753d1c39d0456c8cf726a9cd378b0413f435f1 100644 --- a/htdocs/accountancy/bookkeeping/listbyaccount.php +++ b/htdocs/accountancy/bookkeeping/listbyaccount.php @@ -162,7 +162,7 @@ llxHeader('', $title_page); // List -$nbtotalofrecords = -1; +$nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $nbtotalofrecords = $object->fetchAllByAccount($sortorder, $sortfield, 0, 0, $filter); if ($nbtotalofrecords < 0) { diff --git a/htdocs/accountancy/bookkeeping/listbyyear.php b/htdocs/accountancy/bookkeeping/listbyyear.php index b607d055a7a573b780a662dee9fe532a250a085e..f716339bdc8286de79b08bc25fbe3de8e4ce4104 100644 --- a/htdocs/accountancy/bookkeeping/listbyyear.php +++ b/htdocs/accountancy/bookkeeping/listbyyear.php @@ -158,7 +158,7 @@ if (! empty($search_code_journal)) { * Mode List */ -$nbtotalofrecords = -1; +$nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $nbtotalofrecords = $object->fetchAll($sortorder, $sortfield, 0, 0); if ($nbtotalofrecords < 0) { diff --git a/htdocs/accountancy/customer/lines.php b/htdocs/accountancy/customer/lines.php index 7882c3b9320d58e618a717496ea1d0d3cf0888a6..0e3f96a7457ecf86babd32d93e50e62569582d14 100644 --- a/htdocs/accountancy/customer/lines.php +++ b/htdocs/accountancy/customer/lines.php @@ -200,7 +200,7 @@ $sql .= " AND f.entity IN (" . getEntity("facture", 0) . ")"; // We don't sha $sql .= $db->order($sortfield, $sortorder); // Count total nb of records -$nbtotalofrecords = -1; +$nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); diff --git a/htdocs/accountancy/customer/list.php b/htdocs/accountancy/customer/list.php index dbb342991046d0f5f6fc6780655e60c8e7c5b83b..45dac88f62d6a48408211f1e357cd867bab475fb 100644 --- a/htdocs/accountancy/customer/list.php +++ b/htdocs/accountancy/customer/list.php @@ -220,7 +220,7 @@ $sql .= " AND f.entity IN (" . getEntity("facture", 0) . ")"; // We don't sha $sql .= $db->order($sortfield, $sortorder); // Count total nb of records -$nbtotalofrecords = -1; +$nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); diff --git a/htdocs/accountancy/expensereport/lines.php b/htdocs/accountancy/expensereport/lines.php index 8c47627f2f78357bff1708d6b49acc4fb6b6932d..049e1d446873c7757034e31d1e3268ba9fe1b812 100644 --- a/htdocs/accountancy/expensereport/lines.php +++ b/htdocs/accountancy/expensereport/lines.php @@ -178,7 +178,7 @@ $sql .= " AND er.entity IN (" . getEntity("expensereport", 0) . ")"; // We don' $sql .= $db->order($sortfield, $sortorder); // Count total nb of records -$nbtotalofrecords = -1; +$nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); diff --git a/htdocs/accountancy/expensereport/list.php b/htdocs/accountancy/expensereport/list.php index 396095eee5a9b1f9e00ba59f70cd1f2469ef534b..693984432aef1660a03defcd885bb634e2f730d9 100644 --- a/htdocs/accountancy/expensereport/list.php +++ b/htdocs/accountancy/expensereport/list.php @@ -208,7 +208,7 @@ $sql .= " AND er.entity IN (" . getEntity("expensereport", 0) . ")"; // We don' $sql .= $db->order($sortfield, $sortorder); // Count total nb of records -$nbtotalofrecords = -1; +$nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); diff --git a/htdocs/accountancy/supplier/lines.php b/htdocs/accountancy/supplier/lines.php index d4428dbcb1ab91a8be0bbd1423d7858f89b819b7..f289e0f71f9070d08d412407d341d24ba45301a4 100644 --- a/htdocs/accountancy/supplier/lines.php +++ b/htdocs/accountancy/supplier/lines.php @@ -182,7 +182,7 @@ $sql .= " AND f.entity IN (" . getEntity("facture_fourn", 0) . ")"; // We don't $sql .= $db->order($sortfield, $sortorder); // Count total nb of records -$nbtotalofrecords = -1; +$nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); diff --git a/htdocs/accountancy/supplier/list.php b/htdocs/accountancy/supplier/list.php index 2f19ff0bc75fef7595f00f26c4a12137245b8212..93cdd4d48accde679285d41ddb40e4a49a0f0321 100644 --- a/htdocs/accountancy/supplier/list.php +++ b/htdocs/accountancy/supplier/list.php @@ -217,7 +217,7 @@ $sql .= " AND f.entity IN (" . getEntity("facture_fourn", 0) . ")"; // We don't $sql .= $db->order($sortfield, $sortorder); // Count total nb of records -$nbtotalofrecords = -1; +$nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php index 579c6cdf344699a276c4fd2e165ae604129ef013..c3499bb000aa34c049281be6880e126b6d524064 100644 --- a/htdocs/adherents/list.php +++ b/htdocs/adherents/list.php @@ -250,7 +250,7 @@ $sql.=$hookmanager->resPrint; $sql.= $db->order($sortfield,$sortorder); // Count total nb of records with no order and no limits -$nbtotalofrecords = -1; +$nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $resql = $db->query($sql); diff --git a/htdocs/adherents/subscription/list.php b/htdocs/adherents/subscription/list.php index 078eb1e0e6f065e31e08114aeefff9d8ddbc027e..d8116c79e943483ef99118a5dbfe03d7ce075e95 100644 --- a/htdocs/adherents/subscription/list.php +++ b/htdocs/adherents/subscription/list.php @@ -110,7 +110,7 @@ if ($search_account > 0) $sql.= " AND b.fk_account = ".$search_account; if ($search_amount) $sql.= natural_search('c.subscription', $search_amount, 1); $sql.= $db->order($sortfield,$sortorder); -$nbtotalofrecords = -1; +$nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index cab52dceccc9439c210c62c85b2a6695743f6ac9..5a76ccb59ce7dce290c0d5084306b954f1bcefd5 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -407,7 +407,7 @@ if ($rowid > 0) $sql.=" AND datefin < '".$db->idate($now)."'"; } // Count total nb of records - $nbtotalofrecords = -1; + $nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $resql = $db->query($sql); diff --git a/htdocs/admin/tools/listevents.php b/htdocs/admin/tools/listevents.php index d3691e85df9b88636a4904894487159b6f5efeb1..c44932655edc2526b804b3e82df576527a397aae 100644 --- a/htdocs/admin/tools/listevents.php +++ b/htdocs/admin/tools/listevents.php @@ -174,6 +174,15 @@ if ($search_user) { $usefilter++; $sql.=natural_search("u.login", $search_user, if ($search_desc) { $usefilter++; $sql.=natural_search("e.description", $search_desc, 0); } if ($search_ua) { $usefilter++; $sql.=natural_search("e.user_agent", $search_ua, 0); } $sql.= $db->order($sortfield,$sortorder); + +// Count total nb of records +$nbtotalofrecords = ''; +/*if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) +{ + $result = $db->query($sql); + $nbtotalofrecords = $db->num_rows($result); +}*/ + $sql.= $db->plimit($conf->liste_limit+1, $offset); //print $sql; $result = $db->query($sql); @@ -195,7 +204,7 @@ if ($result) $center='<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?action=purge">'.$langs->trans("Purge").'</a>'; } - print_barre_liste($langs->trans("ListOfSecurityEvents").' ('.$num.')', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $center, $num, 0, 'setup'); + print_barre_liste($langs->trans("ListOfSecurityEvents"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $center, $num, $nbtotalofrecords, 'setup'); if ($action == 'purge') { diff --git a/htdocs/categories/class/api_categories.class.php b/htdocs/categories/class/api_categories.class.php index 4904bbea3b7515977c3c45db7b76a53e272f0af1..1f37623544be43460152ec4e6def51e485e3a508 100644 --- a/htdocs/categories/class/api_categories.class.php +++ b/htdocs/categories/class/api_categories.class.php @@ -209,7 +209,7 @@ class Categories extends DolibarrApi $sql.= ' AND s.rowid = sub.fk_categorie'; $sql.= ' AND sub.'.$subcol_name.' = '.$item; - $nbtotalofrecords = -1; + $nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); diff --git a/htdocs/categories/class/api_deprecated_category.class.php b/htdocs/categories/class/api_deprecated_category.class.php index 62f92b71bea0991a21f4151dbab52c0a00d58e52..6f2f16bb222b956eedfbbf62dcd380affebd222c 100644 --- a/htdocs/categories/class/api_deprecated_category.class.php +++ b/htdocs/categories/class/api_deprecated_category.class.php @@ -124,7 +124,7 @@ class CategoryApi extends DolibarrApi $sql.= ' WHERE s.entity IN ('.getEntity('category', 1).')'; $sql.= ' AND s.type='.array_search($type,CategoryApi::$TYPES); - $nbtotalofrecords = -1; + $nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); @@ -205,7 +205,7 @@ class CategoryApi extends DolibarrApi $sql.= ' AND s.rowid = sub.fk_categorie'; $sql.= ' AND sub.'.$subcol_name.' = '.$item; - $nbtotalofrecords = -1; + $nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); diff --git a/htdocs/comm/action/listactions.php b/htdocs/comm/action/listactions.php index c01e62ae3b5f49a0fbc58f72217df17136ebb00d..0a08b6e55f1ef46073e032b68b28e032ec25cd2c 100644 --- a/htdocs/comm/action/listactions.php +++ b/htdocs/comm/action/listactions.php @@ -245,7 +245,7 @@ if ($datestart > 0) $sql.= " AND a.datep BETWEEN '".$db->idate($datestart)."' AN if ($dateend > 0) $sql.= " AND a.datep2 BETWEEN '".$db->idate($dateend)."' AND '".$db->idate($dateend+3600*24-1)."'"; $sql.= $db->order($sortfield,$sortorder); -$nbtotalofrecords = -1; +$nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); diff --git a/htdocs/comm/action/rapport/index.php b/htdocs/comm/action/rapport/index.php index fdc94005cdb717bfbd587c5922e080c39329f5c1..97f255abe14f92035fbc2dd469b880f7c2bf5efd 100644 --- a/htdocs/comm/action/rapport/index.php +++ b/htdocs/comm/action/rapport/index.php @@ -85,7 +85,7 @@ $sql.= ' AND a.entity IN ('.getEntity('agenda', 1).')'; $sql.= " GROUP BY year, month, df"; $sql.= " ORDER BY year DESC, month DESC, df DESC"; -$nbtotalofrecords = -1; +$nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); diff --git a/htdocs/comm/mailing/cibles.php b/htdocs/comm/mailing/cibles.php index ab7ee3c7c8a05364b66503483f3d2256d59fcd0d..e104db4dcda9404ffae3b511d3014db9d193f09c 100644 --- a/htdocs/comm/mailing/cibles.php +++ b/htdocs/comm/mailing/cibles.php @@ -412,7 +412,7 @@ if ($object->fetch($id) >= 0) $sql .= $db->order($sortfield,$sortorder); // Count total nb of records - $nbtotalofrecords = -1; + $nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index 647ed8a7b4b96aa6e7a9bba801def09b71b7dc15..040e78b7f1aa76c3f91cd7e17d8a655d563f1f10 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -333,7 +333,7 @@ $sql.= $db->order($sortfield,$sortorder); $sql.=', p.ref DESC'; // Count total nb of records -$nbtotalofrecords = -1; +$nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); diff --git a/htdocs/commande/class/api_deprecated_commande.class.php b/htdocs/commande/class/api_deprecated_commande.class.php index 4595bdbb287111e47ff9797fbe3b25063c04dbda..aa1584c4fed2c223e22c7b8b297b208440fe6a30 100644 --- a/htdocs/commande/class/api_deprecated_commande.class.php +++ b/htdocs/commande/class/api_deprecated_commande.class.php @@ -139,7 +139,7 @@ class CommandeApi extends DolibarrApi $sql .= " AND sc.fk_user = ".$search_sale; } - $nbtotalofrecords = -1; + $nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); diff --git a/htdocs/commande/customer.php b/htdocs/commande/customer.php index 8190367a06ad7060187486da9b2ecc418b8bcd4d..5f9a5a570ffe354962dd818df1f32e6bd9bdff4f 100644 --- a/htdocs/commande/customer.php +++ b/htdocs/commande/customer.php @@ -97,7 +97,7 @@ $sql.= " GROUP BY s.nom"; $sql.= $db->order($sortfield,$sortorder); // Count total nb of records -$nbtotalofrecords = -1; +$nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 6e304a019d09034a1a5ed09d484651988bd29e35..662a727c88b65c2b3690d38b18d1aadfc29db41c 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -560,7 +560,7 @@ $sql.=$hookmanager->resPrint; $sql.= $db->order($sortfield,$sortorder); // Count total nb of records -$nbtotalofrecords = -1; +$nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); diff --git a/htdocs/compta/bank/bankentries.php b/htdocs/compta/bank/bankentries.php index 5cae7aff723e244488b3b717da291cf48fc95251..f13b650eff248f46245b617570dcf84b17b2e411 100644 --- a/htdocs/compta/bank/bankentries.php +++ b/htdocs/compta/bank/bankentries.php @@ -502,7 +502,7 @@ $sql.=$hookmanager->resPrint; $sql.= $db->order($sortfield,$sortorder); -$nbtotalofrecords = -1; +$nbtotalofrecords = ''; $nbtotalofpages = 0; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { diff --git a/htdocs/compta/bank/index.php b/htdocs/compta/bank/index.php index 82283547d99bbfc012dc37476f50d0d703e73cf5..298773021043532fb208cab043991c374bcd8eb0 100644 --- a/htdocs/compta/bank/index.php +++ b/htdocs/compta/bank/index.php @@ -175,7 +175,7 @@ $sql.=$hookmanager->resPrint; $sql.= $db->order($sortfield,$sortorder); // Count total nb of records -$nbtotalofrecords = -1; +$nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); diff --git a/htdocs/compta/facture/class/api_deprecated_invoice.class.php b/htdocs/compta/facture/class/api_deprecated_invoice.class.php index 7dd8a7ee6bcfbe57d314207d13dd90dd48e24819..b638a46b920f6ef30d8aa72003eb076d3277ea78 100644 --- a/htdocs/compta/facture/class/api_deprecated_invoice.class.php +++ b/htdocs/compta/facture/class/api_deprecated_invoice.class.php @@ -138,7 +138,7 @@ class InvoiceApi extends DolibarrApi $sql .= " AND sc.fk_user = ".$search_sale; } - $nbtotalofrecords = -1; + $nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); diff --git a/htdocs/compta/facture/fiche-rec.php b/htdocs/compta/facture/fiche-rec.php index 176279643625383618708d6103a0d2745ed00a98..584d39154304635e61f742b831af51db0f406410 100644 --- a/htdocs/compta/facture/fiche-rec.php +++ b/htdocs/compta/facture/fiche-rec.php @@ -1575,7 +1575,7 @@ else $sql.= " AND f.date_when BETWEEN '".$db->idate(dol_get_first_day($year_date_when,1,false))."' AND '".$db->idate(dol_get_last_day($year_date_when,12,false))."'"; } - $nbtotalofrecords = -1; + $nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index d2c20099edcbbcd23b83fb961ae0b86fc53959ce..8807023784d374576a331af4bfe74d530fe53515 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -402,7 +402,7 @@ $listfield=explode(',',$sortfield); foreach ($listfield as $key => $value) $sql.= $listfield[$key].' '.$sortorder.','; $sql.= ' f.rowid DESC '; -$nbtotalofrecords = -1; +$nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); diff --git a/htdocs/compta/paiement/cheque/list.php b/htdocs/compta/paiement/cheque/list.php index e7cd70c1e30aa56ff8bb990f3c100ebc29d38c18..ae9bc3158775d828c68222ac7b727d9ee9a4034a 100644 --- a/htdocs/compta/paiement/cheque/list.php +++ b/htdocs/compta/paiement/cheque/list.php @@ -112,7 +112,7 @@ else if ($year > 0) } $sql.= $db->order($sortfield,$sortorder); -$nbtotalofrecords = -1; +$nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); diff --git a/htdocs/compta/paiement/list.php b/htdocs/compta/paiement/list.php index 46c54d32a476c65caba8d3cb6cb8532e15b07330..4cb63b7d9059b04e2781e1f70feef25b6deb89e4 100644 --- a/htdocs/compta/paiement/list.php +++ b/htdocs/compta/paiement/list.php @@ -186,7 +186,7 @@ else } $sql.= $db->order($sortfield,$sortorder); -$nbtotalofrecords = -1; +$nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php index 33e5110153be39d9b1bfc24576c0896e0b403d82..04010fd3ad2ca990e11acd5bd4d7175363c130a7 100644 --- a/htdocs/contact/list.php +++ b/htdocs/contact/list.php @@ -365,7 +365,7 @@ else } // Count total nb of records -$nbtotalofrecords = -1; +$nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php index 8a8ff68097a2f796ec35c69c7a81f1cd28e378ff..849a466e18d429cdb4a0141f962ca9239b78fd85 100644 --- a/htdocs/contrat/list.php +++ b/htdocs/contrat/list.php @@ -288,7 +288,7 @@ if ($result) $totalnboflines = $db->num_rows($result); } -$nbtotalofrecords = -1; +$nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); diff --git a/htdocs/contrat/services.php b/htdocs/contrat/services.php index 4fc2f9f53c3b5c665789fff44cbf04b5cc638b75..42ff4b04e838455fbd3c05dd3d8676abe02ed8c4 100644 --- a/htdocs/contrat/services.php +++ b/htdocs/contrat/services.php @@ -236,7 +236,7 @@ if (! empty($filter_op2) && $filter_op2 != -1 && $filter_date2 != '') $sql.= " A if (! empty($filter_opcloture) && $filter_opcloture != -1 && $filter_datecloture != '') $sql.= " AND cd.date_cloture ".$filter_opcloture." '".$db->idate($filter_datecloture)."'"; $sql .= $db->order($sortfield,$sortorder); -$nbtotalofrecords = -1; +$nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 2ce0bd1a524834d81dedba56da921717a8689f36..72762db4f84e45db5ed80b4a347bdcdf22e4e66a 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3184,7 +3184,7 @@ function load_fiche_titre($titre, $morehtmlright='', $picto='title_generic.png', * @param string $sortorder Order to sort ('' by default) * @param string $center String in the middle ('' by default). We often find here string $massaction comming from $form->selectMassAction() * @param int $num Number of records found by select with limit+1 - * @param int $totalnboflines Total number of records/lines for all pages (if known). Use a negative value to not show number. + * @param int|string $totalnboflines Total number of records/lines for all pages (if known). Use a negative value of number to not show number. Use '' if unknown. * @param string $picto Icon to use before title (should be a 32x32 transparent png file) * @param int $pictoisfullpath 1=Icon name is a full absolute url of image * @param string $morehtml More html to show @@ -3193,7 +3193,7 @@ function load_fiche_titre($titre, $morehtmlright='', $picto='title_generic.png', * @param int $hideselectlimit Force to hide select limit * @return void */ -function print_barre_liste($titre, $page, $file, $options='', $sortfield='', $sortorder='', $center='', $num=-1, $totalnboflines=-1, $picto='title_generic.png', $pictoisfullpath=0, $morehtml='', $morecss='', $limit=-1, $hideselectlimit=0) +function print_barre_liste($titre, $page, $file, $options='', $sortfield='', $sortorder='', $center='', $num=-1, $totalnboflines='', $picto='title_generic.png', $pictoisfullpath=0, $morehtml='', $morecss='', $limit=-1, $hideselectlimit=0) { global $conf,$langs; @@ -3223,7 +3223,7 @@ function print_barre_liste($titre, $page, $file, $options='', $sortfield='', $so print '<td class="nobordernopadding valignmiddle">'; if ($picto && $titre) print img_picto('', $picto, 'class="hideonsmartphone valignmiddle" id="pictotitle"', $pictoisfullpath); print '<div class="titre inline-block">'.$titre; - if (!empty($titre) && $savtotalnboflines >= 0) print ' ('.$totalnboflines.')'; + if (!empty($titre) && $savtotalnboflines >= 0 && (string) $savtotalnboflines != '') print ' ('.$totalnboflines.')'; print '</div></td>'; // Center diff --git a/htdocs/cron/list.php b/htdocs/cron/list.php index acfdeba7d8eb47c442eb3a6115a8cf54fa5ba672..5ca0fc61cf248b5e9968ca11d321a21317991110 100644 --- a/htdocs/cron/list.php +++ b/htdocs/cron/list.php @@ -225,7 +225,7 @@ $sql.=$hookmanager->resPrint; $sql.= $db->order($sortfield,$sortorder); // Count total nb of records -$nbtotalofrecords = -1; +$nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); diff --git a/htdocs/don/list.php b/htdocs/don/list.php index 9ca8a79bb159caeda204d097a543f546dac15017..d925573b8591ec543ed597c32b1ed070288b40de 100644 --- a/htdocs/don/list.php +++ b/htdocs/don/list.php @@ -113,7 +113,7 @@ if (trim($search_name) != '') if ($search_amount) $sql.= natural_search(array('d.amount'), price2num(trim($search_amount)), 1); $sql.= $db->order($sortfield,$sortorder); -$nbtotalofrecords = -1; +$nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); diff --git a/htdocs/expedition/list.php b/htdocs/expedition/list.php index 34c989587afa48997441227050f9968288c1601e..65d7fd5223e706c5765cea93c5859b9a58d1c2d8 100644 --- a/htdocs/expedition/list.php +++ b/htdocs/expedition/list.php @@ -238,7 +238,7 @@ $parameters=array(); $reshook=$hookmanager->executeHooks('printFieldListWhere',$parameters); // Note that $action and $object may have been modified by hook $sql.=$hookmanager->resPrint; -$nbtotalofrecords = -1; +$nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); diff --git a/htdocs/expensereport/list.php b/htdocs/expensereport/list.php index 00b6343bf97f905165f788281325daadc248f20d..7928e0f8e3d663cfbe2ccb379a34551f0adc8177 100644 --- a/htdocs/expensereport/list.php +++ b/htdocs/expensereport/list.php @@ -266,7 +266,7 @@ $sql.=$hookmanager->resPrint; $sql.= $db->order($sortfield,$sortorder); -$nbtotalofrecords = -1; +$nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); diff --git a/htdocs/fourn/commande/list.php b/htdocs/fourn/commande/list.php index f8faa5fa75389504966180a28ff9d25c51fc6ecd..90647b7c65ab37b2e7143b630bf7845f1da5d1f9 100644 --- a/htdocs/fourn/commande/list.php +++ b/htdocs/fourn/commande/list.php @@ -371,7 +371,7 @@ $sql.=$hookmanager->resPrint; $sql.= $db->order($sortfield,$sortorder); -$nbtotalofrecords = -1; +$nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index fd403e90e21cf34922bfd10f90b140399a60474d..ad05d000f8c2d5a9e1b737194ad03c9e036f6948 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -372,7 +372,7 @@ $sql.=$hookmanager->resPrint; $sql.= $db->order($sortfield,$sortorder); -$nbtotalofrecords = -1; +$nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php index a41978064f6316fe4bb931cc549c8b58e0f36421..2400992b250567207bdf6899ef13abc04d86e012 100644 --- a/htdocs/fourn/facture/paiement.php +++ b/htdocs/fourn/facture/paiement.php @@ -639,7 +639,7 @@ if (empty($action)) if (!$user->rights->societe->client->voir) $sql .= ", sc.fk_soc, sc.fk_user"; $sql.= $db->order($sortfield,$sortorder); - $nbtotalofrecords = -1; + $nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); diff --git a/htdocs/fourn/product/list.php b/htdocs/fourn/product/list.php index 971849092909ee6e926ab4511f3b1b39d5ec0235..0e17a48b356aa6498dc7d9f89128e96b8571af0a 100644 --- a/htdocs/fourn/product/list.php +++ b/htdocs/fourn/product/list.php @@ -120,7 +120,7 @@ if ($fourn_id > 0) $sql .= " AND ppf.fk_soc = ".$fourn_id; } // Count total nb of records without orderby and limit -$nbtotalofrecords = -1; +$nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); diff --git a/htdocs/loan/index.php b/htdocs/loan/index.php index aea84394c1c2d5e61e3d58f39630985815996723..3fc56e992044a53c103a7411702d71985904bdb0 100644 --- a/htdocs/loan/index.php +++ b/htdocs/loan/index.php @@ -86,7 +86,7 @@ if ($filtre) { $sql.= " GROUP BY l.rowid, l.label, l.capital, l.datestart, l.dateend"; $sql.= $db->order($sortfield,$sortorder); -$nbtotalofrecords = -1; +$nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); diff --git a/htdocs/margin/checkMargins.php b/htdocs/margin/checkMargins.php index eb3292cd332f4fa64bcc0462e027f026f91b5278..93f6e6915f94aee377f94eff839c93b23cd34885 100644 --- a/htdocs/margin/checkMargins.php +++ b/htdocs/margin/checkMargins.php @@ -157,7 +157,7 @@ if (! empty($enddate)) $sql .= " AND d.buy_price_ht IS NOT NULL"; $sql .= $db->order($sortfield, $sortorder); -$nbtotalofrecords = -1; +$nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { dol_syslog(__FILE__, LOG_DEBUG); diff --git a/htdocs/opensurvey/list.php b/htdocs/opensurvey/list.php index 847cd5289dca4aa4583ab5c342523a32fb7a7d24..9a95797736dfd2988687b0f8122a7d61c351441b 100644 --- a/htdocs/opensurvey/list.php +++ b/htdocs/opensurvey/list.php @@ -124,7 +124,7 @@ $sql.= " u.login, u.firstname, u.lastname"; $sql.= " FROM ".MAIN_DB_PREFIX."opensurvey_sondage as p"; $sql.= " LEFT OUTER JOIN ".MAIN_DB_PREFIX."user u ON u.rowid = p.fk_user_creat"; // Count total nb of records -$nbtotalofrecords = -1; +$nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); diff --git a/htdocs/product/class/api_deprecated_product.class.php b/htdocs/product/class/api_deprecated_product.class.php index df0cddd8aaf39499627fdf01184c4cd5a9888a62..49af8c73123a449f3f5138cea056779d6a10ae09 100644 --- a/htdocs/product/class/api_deprecated_product.class.php +++ b/htdocs/product/class/api_deprecated_product.class.php @@ -126,7 +126,7 @@ class ProductApi extends DolibarrApi // Show product on buy if ($to_buy) $sql.= " AND p.to_buy = ".$db->escape($to_buy); - $nbtotalofrecords = -1; + $nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); @@ -212,7 +212,7 @@ class ProductApi extends DolibarrApi // Show product on buy if ($to_buy) $sql.= " AND p.to_buy = ".$db->escape($to_buy); - $nbtotalofrecords = -1; + $nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); diff --git a/htdocs/product/list.php b/htdocs/product/list.php index 48693cd0ac7dd99f9ad8f3ba15367a8b967dea5c..4f1f97cef8a1a327891da64f3dc1fcbaa3b275f8 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -304,7 +304,7 @@ else $sql.=$hookmanager->resPrint; //if (GETPOST("toolowstock")) $sql.= " HAVING SUM(s.reel) < p.seuil_stock_alerte"; // Not used yet $sql.= $db->order($sortfield,$sortorder); - $nbtotalofrecords = -1; + $nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); diff --git a/htdocs/product/price.php b/htdocs/product/price.php index d3c3784c00c3abffd52aff42ac72d91220ee8879..eb0f49cb77f95e66d519acbc99523fe8d7156399 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -1668,7 +1668,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) $filter = array('t.fk_product' => $object->id,'t.fk_soc' => GETPOST('socid', 'int')); // Count total nb of records - $nbtotalofrecords = -1; + $nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $nbtotalofrecords = $prodcustprice->fetch_all_log($sortorder, $sortfield, $conf->liste_limit, $offset, $filter); } @@ -1748,7 +1748,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) // List of all prices by customers // Count total nb of records - $nbtotalofrecords = -1; + $nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $nbtotalofrecords = $prodcustprice->fetch_all($sortorder, $sortfield, 0, 0, $filter); } diff --git a/htdocs/product/stock/mouvement.php b/htdocs/product/stock/mouvement.php index 3505247862bc59956943a120bcd0fef7055734c7..8e6775e2e6eaafc9383da47a53ff0d86e5cd01b5 100644 --- a/htdocs/product/stock/mouvement.php +++ b/htdocs/product/stock/mouvement.php @@ -456,7 +456,7 @@ $reshook=$hookmanager->executeHooks('printFieldListWhere',$parameters); // No $sql.=$hookmanager->resPrint; $sql.= $db->order($sortfield,$sortorder); -$nbtotalofrecords = -1; +$nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); diff --git a/htdocs/product/stock/productlot_list.php b/htdocs/product/stock/productlot_list.php index 848bc519946f532b9d3818c7d8fbaa56f9ac79e2..2910103e3807c12dd0f52f4a33231754f4d36a07 100644 --- a/htdocs/product/stock/productlot_list.php +++ b/htdocs/product/stock/productlot_list.php @@ -259,7 +259,7 @@ $sql.=$db->order($sortfield,$sortorder); //$sql.= $db->plimit($conf->liste_limit+1, $offset); // Count total nb of records -$nbtotalofrecords = -1; +$nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php index 1295eb970a051b0f261385d3fb7386af0c42a2ae..68077621771a7b28f2529421af0f7a5568b34b1e 100644 --- a/htdocs/projet/list.php +++ b/htdocs/projet/list.php @@ -318,7 +318,7 @@ $reshook=$hookmanager->executeHooks('printFieldListWhere',$parameters); // No $sql.=$hookmanager->resPrint; $sql.= $db->order($sortfield,$sortorder); -$nbtotalofrecords = -1; +$nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); diff --git a/htdocs/projet/tasks/list.php b/htdocs/projet/tasks/list.php index 41169e0d77cadd31a79fabe308789905eae9698c..e1da8444319f01d80069b2700a77bbf06eed8d98 100644 --- a/htdocs/projet/tasks/list.php +++ b/htdocs/projet/tasks/list.php @@ -308,7 +308,7 @@ $reshook=$hookmanager->executeHooks('printFieldListWhere',$parameters); // No $sql.=$hookmanager->resPrint; $sql.= $db->order($sortfield,$sortorder); -$nbtotalofrecords = -1; +$nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); diff --git a/htdocs/societe/class/api_deprecated_contact.class.php b/htdocs/societe/class/api_deprecated_contact.class.php index b9c991c7fa5b9e77410e6adb864333dfc51e0c38..196a1386b5d6603bd76d1bb813bd2e57346826e0 100644 --- a/htdocs/societe/class/api_deprecated_contact.class.php +++ b/htdocs/societe/class/api_deprecated_contact.class.php @@ -143,7 +143,7 @@ class ContactApi extends DolibarrApi $sql .= " AND sc.fk_user = " . $search_sale; } - $nbtotalofrecords = -1; + $nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); diff --git a/htdocs/societe/class/api_deprecated_thirdparty.class.php b/htdocs/societe/class/api_deprecated_thirdparty.class.php index 8b0302f9c118ce0345739ca8e5e57b963609bc6a..96a2ebac32175b93f3dc3c323a5ae22903a848af 100644 --- a/htdocs/societe/class/api_deprecated_thirdparty.class.php +++ b/htdocs/societe/class/api_deprecated_thirdparty.class.php @@ -190,7 +190,7 @@ class ThirdpartyApi extends DolibarrApi $sql .= " AND sc.fk_user = ".$search_sale; } - $nbtotalofrecords = -1; + $nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index 8982d2db32d8b6b047783e9d0384d0acddbe4055..301ca845286b18dd7a7c234107058ce9f9ed948b 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -439,7 +439,7 @@ $sql.=$hookmanager->resPrint; $sql.= $db->order($sortfield,$sortorder); // Count total nb of records -$nbtotalofrecords = -1; +$nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); diff --git a/htdocs/societe/price.php b/htdocs/societe/price.php index db2592f225cbfaf55111a7bc7a63ecf586e142af..e8dc595c6c3576b4c08980cd792ccaa6fbbb1b3f 100644 --- a/htdocs/societe/price.php +++ b/htdocs/societe/price.php @@ -379,7 +379,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { ); // Count total nb of records - $nbtotalofrecords = -1; + $nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $nbtotalofrecords = $prodcustprice->fetch_all_log($sortorder, $sortfield, $conf->liste_limit, $offset, $filter); } @@ -469,7 +469,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { // Count total nb of records - $nbtotalofrecords = -1; + $nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $nbtotalofrecords = $prodcustprice->fetch_all('', '', 0, 0, $filter); diff --git a/htdocs/supplier_proposal/list.php b/htdocs/supplier_proposal/list.php index a8e3809877528e807288f87371317457beab9071..401eef99a351f73fb994c8b93d1c64fb4c713685 100644 --- a/htdocs/supplier_proposal/list.php +++ b/htdocs/supplier_proposal/list.php @@ -285,7 +285,7 @@ if ($search_user > 0) $sql.= ' ORDER BY '.$sortfield.' '.$sortorder.', sp.ref DESC'; -$nbtotalofrecords = -1; +$nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql);