ehh, hmm: include -> require
[squirrelmail.git] / src / addrbook_search.php
index dbaff000dfccb656f827fde9803f5b920344c8c6..5cb11ff1081d385c530e6f61afafeaed7e0ea140 100644 (file)
@@ -16,6 +16,7 @@
  */
 
 require_once('../src/validate.php');
+require_once('../functions/strings.php');
 
 /* Function to include JavaScript code */
 function insert_javascript() {
@@ -105,7 +106,7 @@ function display_result($res, $includesource = true) {
     
     while (list($undef, $row) = each($res)) {
         echo '<tr';
-        if ($line % 2) { echo ' bgcolor="' . $color[0] . '"' }
+        if ($line % 2) { echo ' bgcolor="' . $color[0] . '"'; }
         echo ' nowrap><td valign=top nowrap align=center width="5%">' .
              '<small><a href="javascript:to_address(' . 
                                        "'" . $row['email'] . "');\">To</A> | " .
@@ -205,6 +206,7 @@ if ($show == 'form') {
             $res = $abook->list_addr($backend);
 
             if(is_array($res)) {
+                usort($res,'alistcmp');
                 display_result($res, false);
             } else {
                 echo '<P ALIGN=center><STRONG>' .
@@ -214,6 +216,7 @@ if ($show == 'form') {
             }
         } else {
             $res = $abook->list_addr();
+            usort($res,'alistcmp');
             display_result($res, true);
         }