X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Faddrbook_search.php;h=89143a808bad4c006201a5bcca985a8e04e249bd;hb=a11df61b949068712242d77e2c18311c93e63979;hp=9557065cf1f74af43075cf0a90a5c0c613912141;hpb=9487c2ff3a9d36af3dc93bd231a6f85fe7a6f762;p=squirrelmail.git diff --git a/src/addrbook_search.php b/src/addrbook_search.php index 9557065c..89143a80 100644 --- a/src/addrbook_search.php +++ b/src/addrbook_search.php @@ -1,244 +1,296 @@ - - '; - printf("
%s
"._("Unable to list addresses from %s"). - "
\n", $abook->backends[$backend]->sname); + echo html_tag( 'p', '' . + sprintf(_("Unable to list addresses from %s"), + $abook->backends[$backend]->sname) . '' , + 'center' ) . "\n"; } - } else { - $res = $abook->list_addr(); - display_result($res, true); + $res = $abook->list_addr(); + usort($res,'alistcmp'); + display_result($res, true); } - } else + } else { + if( !empty( $listall ) ){ + $query = '*'; + } - // Do the search - if(!empty($query) && empty($listall)) { + /* Do the search */ + if (!empty($query)) { - if($backend == -1) { - $res = $abook->s_search($query); - } else { - $res = $abook->s_search($query, $backend); - } + if($backend == -1) { + $res = $abook->s_search($query); + } else { + $res = $abook->s_search($query, $backend); + } - if(!is_array($res)) { - printf("
%s:
%s