X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Faddrbook_search.php;h=8051122a078662e024720d27c9cc4c510559218e;hb=e13e66be672d414470a5502f13734837b43a478f;hp=fa5fa5705499e324b0c76f6f06fd3bce5398d0c9;hpb=b0c396652f1ba7ae259a6998105f95d0fbcf0531;p=squirrelmail.git diff --git a/src/addrbook_search.php b/src/addrbook_search.php index fa5fa570..8051122a 100644 --- a/src/addrbook_search.php +++ b/src/addrbook_search.php @@ -15,23 +15,8 @@ * $Id$ */ -/*****************************************************************/ -/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!! ***/ -/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION. ***/ -/*** + Base level indent should begin at left margin, as ***/ -/*** the require_once below looks. ***/ -/*** + All identation should consist of four space blocks ***/ -/*** + Tab characters are evil. ***/ -/*** + all comments should use "slash-star ... star-slash" ***/ -/*** style -- no pound characters, no slash-slash style ***/ -/*** + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD ***/ -/*** ALWAYS USE { AND } CHARACTERS!!! ***/ -/*** + Please use ' instead of ", when possible. Note " ***/ -/*** should always be used in _( ) function calls. ***/ -/*** Thank you for your help making the SM code more readable. ***/ -/*****************************************************************/ - require_once('../src/validate.php'); +require_once('../functions/strings.php'); /* Function to include JavaScript code */ function insert_javascript() { @@ -120,19 +105,20 @@ function display_result($res, $includesource = true) { echo "\n"; while (list($undef, $row) = each($res)) { - echo '
' . "\n" . + ' | ||
' . "\n" . ' ' . _("Search for") . "\n" . - ' \n", + ' | \n"; /* List all backends to allow the user to choose where to search */ if ($abook->numbackends > 1) { @@ -201,17 +188,17 @@ if ($show == 'form') { echo '' . "\n"; } - echo '' . + echo ' | |
'. + '' . ' | ' . "\n" . - ' | ' . "\n" . - '' . "\n" . ' |
' . @@ -229,13 +217,17 @@ if ($show == 'form') { } } else { $res = $abook->list_addr(); + usort($res,'alistcmp'); display_result($res, true); } } else { + if( !empty( $listall ) ){ + $query = '*'; + } /* Do the search */ - if (!empty($query) && empty($listall)) { + if (!empty($query)) { if($backend == -1) { $res = $abook->s_search($query);