diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index 582922cd60e..f210e44be88 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -522,6 +522,17 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='') global $user,$conf; global $bc; + $form= new Form($db); + + $sortfield = GETPOST("sortfield",'alpha'); + $sortorder = GETPOST("sortorder",'alpha'); + $search_status = GETPOST("search_status",'int'); + if ($search_status=='') $search_status=1; // always display activ customer first + $search_name = GETPOST("search_name",'alpha'); + + if (! $sortorder) $sortorder="ASC"; + if (! $sortfield) $sortfield="p.lastname"; + $i=-1; $contactstatic = new Contact($db); @@ -547,20 +558,30 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='') print "\n".'