diff --git a/htdocs/fourn/contact.php b/htdocs/fourn/contact.php index 22f9990dafc..a0c302ed9f6 100644 --- a/htdocs/fourn/contact.php +++ b/htdocs/fourn/contact.php @@ -21,6 +21,13 @@ * */ +/** + \file htdocs/fourn/contact.php + \ingroup fournisseur + \brief Liste des contacts fournisseurs + \version $Revision$ +*/ + require("./pre.inc.php"); $langs->load("companies"); @@ -40,15 +47,8 @@ $page=$_GET["page"]; $sortorder=$_GET["sortorder"]; $sortfield=$_GET["sortfield"]; -if ($sortorder == "") -{ - $sortorder="ASC"; -} -if ($sortfield == "") - { - $sortfield="p.name"; -} - +if (! $sortorder) $sortorder="ASC"; +if (! $sortfield) $sortfield="p.name"; if ($page == -1) { $page = 0 ; } $limit = $conf->liste_limit; $offset = $limit * $page ; @@ -85,22 +85,22 @@ $sql .= " ORDER BY $sortfield $sortorder " . $db->plimit( $limit, $offset); $result = $db->query($sql); if ($result) { - $num = $db->num_rows(); + $num = $db->num_rows($result); print_barre_liste($langs->trans("ListOfContacts")." (".$langs->trans("Suppliers").")",$page, "contact.php", "",$sortfield,$sortorder,"",$num); print '
| '.$langs->trans("Email").' | '.$langs->trans("Phone").' | '; print "