Modif tri par dfaut (cette fois c'est bon ;-)

This commit is contained in:
Rodolphe Quiedeville
2003-07-10 18:57:25 +00:00
parent 96e5927a2b
commit 83a3f8db2f

View File

@@ -36,16 +36,8 @@ if ($user->societe_id > 0)
$socidp = $user->societe_id;
}
$db = new Db();
if ($sortorder == "") {
$sortorder="ASC";
}
if ($sortfield == "") {
$sortfield="nom";
}
if ($action=='add_action') {
/*
* Vient de actioncomm.php3
@@ -186,8 +178,17 @@ if ($user->societe_id)
if ($socname)
{
$sql .= " AND lower(s.nom) like '%".strtolower($socname)."%'";
$sortfield = "s.datec";
$sortorder = "DESC";
$sortfield = "lower(s.nom)";
$sortorder = "ASC";
}
if ($sortorder == "")
{
$sortorder="DESC";
}
if ($sortfield == "")
{
$sortfield="s.datec";
}
$sql .= " ORDER BY $sortfield $sortorder " . $db->plimit($conf->liste_limit +1, $offset);