X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Faddrbook_search.php;h=4e914beef1ef4f28c5297d4665e19f6148e3510e;hb=0fa230016e399929e51d8e007b1509421424c7de;hp=9557065cf1f74af43075cf0a90a5c0c613912141;hpb=9487c2ff3a9d36af3dc93bd231a6f85fe7a6f762;p=squirrelmail.git diff --git a/src/addrbook_search.php b/src/addrbook_search.php index 9557065c..4e914bee 100644 --- a/src/addrbook_search.php +++ b/src/addrbook_search.php @@ -1,244 +1,291 @@ - + function bcc_address($addr) { + var prefix = ""; + var pwintype = typeof parent.opener.document.compose; + + $addr = $addr.replace(/ {1,35}$/, ""); + + if (pwintype != "undefined") { + if (parent.opener.document.compose.send_to_bcc.value) { + prefix = ", "; + parent.opener.document.compose.send_to_bcc.value = + parent.opener.document.compose.send_to_bcc.value + ", " + $addr; + } else { + parent.opener.document.compose.send_to_bcc.value = $addr; + } + } + } +// --> '; - 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