X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Faddrbook_search.php;h=cfbe3ba8b6c296026aad418691ccefd89ca84794;hb=6a2f68354009082148e09f5c82a29d1b17f69190;hp=9557065cf1f74af43075cf0a90a5c0c613912141;hpb=9487c2ff3a9d36af3dc93bd231a6f85fe7a6f762;p=squirrelmail.git diff --git a/src/addrbook_search.php b/src/addrbook_search.php index 9557065c..cfbe3ba8 100644 --- a/src/addrbook_search.php +++ b/src/addrbook_search.php @@ -1,244 +1,143 @@ - +/* Initialize addressbook, show init errors only in bottom frame */ +$showerr=($show=='form' ? false : true); +$abook = addressbook_init($showerr); -'; - printf("
"._("Unable to list addresses from %s"). - "
\n", $abook->backends[$backend]->sname); + plain_error_message(sprintf(_("Unable to list addresses from %s"), $abook->backends[$backend]->sname)); } - } else { - $res = $abook->list_addr(); - display_result($res, true); + $res = $abook->list_addr(); + usort($res,'alistcmp'); + display_result($res, true); } - } else + } elseif (!empty($query)) { + /* Do the search (listall is not set. query is set.)*/ - // Do the search - if(!empty($query) && empty($listall)) { - if($backend == -1) { $res = $abook->s_search($query); } else { $res = $abook->s_search($query, $backend); } - - if(!is_array($res)) { - printf("
%s:
%s