Added $color[15] for the "unselectable folders" color.
[squirrelmail.git] / functions / addressbook.php
index 92f298c2bea5cad7849604e45a60c490394cfeb5..4432751b2fa0ba4a2b61e43fa1353a13e007c878 100644 (file)
@@ -314,7 +314,6 @@ class AddressBook {
         return $ret;
     }
 
-
     /*
      * Create a new address from $userdata, in backend $bnum.
      * Return the backend number that the/ address was added
@@ -511,4 +510,16 @@ class addressbook_backend {
 
 }
 
+/* Sort array by the key "name" */
+function alistcmp($a,$b) {
+    if ($a['backend'] > $b['backend']) {
+        return 1;
+    } else {
+        if ($a['backend'] < $b['backend']) {
+            return -1;
+        }
+    }
+    return (strtolower($a['name']) > strtolower($b['name'])) ? 1 : -1;
+}
+
 ?>