X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=functions%2Faddressbook.php;h=4432751b2fa0ba4a2b61e43fa1353a13e007c878;hb=6a9acbca99e0444d2d958cc2ce16cd29565570b6;hp=92f298c2bea5cad7849604e45a60c490394cfeb5;hpb=15e6162eacc97158393bc75aed3afeb7b19c24a6;p=squirrelmail.git diff --git a/functions/addressbook.php b/functions/addressbook.php index 92f298c2..4432751b 100644 --- a/functions/addressbook.php +++ b/functions/addressbook.php @@ -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; +} + ?>