From 958becc963e326267f1779aba20d699096cb0178 Mon Sep 17 00:00:00 2001 From: alex-brainstorm Date: Mon, 10 May 2004 12:45:27 +0000 Subject: [PATCH] XHTML fixes, as pointed out by Tomas. Also reenabled getting last criteria from prefs if not in session. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@7420 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- src/search.php | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/search.php b/src/search.php index 2a7377ae..e486dad2 100644 --- a/src/search.php +++ b/src/search.php @@ -390,7 +390,7 @@ function asearch_edit_recent($index) } } -/** Edit the last recent search if the prefs permit it +/** Get last search criteria from session or prefs */ function asearch_edit_last() { @@ -407,9 +407,9 @@ function asearch_edit_last() sqsession_unregister(ASEARCH_CRITERIA); } else { -/* global $search_memory; + global $search_memory; if ($search_memory > 0) - asearch_edit_recent(0);*/ + asearch_edit_recent(0); } } @@ -498,7 +498,7 @@ function asearch_get_query_display(&$color, &$mailbox_array, &$biop_array, &$uno $cur_mailbox = 'INBOX'; $biop = asearch_nz($biop_array[$crit_num]); if (($query_display == '') || ($cur_mailbox != $last_mailbox)) { - $mailbox_display = ' ' . asearch_get_mailbox_display($cur_mailbox) . ''; + $mailbox_display = ' ' . asearch_get_mailbox_display($cur_mailbox) . ''; if ($query_display == '') $biop_display = _("In"); else @@ -525,7 +525,7 @@ function asearch_get_query_display(&$color, &$mailbox_array, &$biop_array, &$uno $what_display = asearch_get_date_display($what); else $what_display = htmlspecialchars($what); - $what_display = ' ' . $what_display . ''; + $what_display = ' ' . $what_display . ''; } } else { @@ -535,9 +535,9 @@ function asearch_get_query_display(&$color, &$mailbox_array, &$biop_array, &$uno $what_display = ''; } if ($mailbox_display != '') - $query_display .= ' ' . $biop_display . '' . $mailbox_display . ' ' . $where_display . '' . $what_display; + $query_display .= ' ' . $biop_display . '' . $mailbox_display . ' ' . $where_display . '' . $what_display; else - $query_display .= ' ' . $biop_display . ' ' . $where_display . '' . $what_display; + $query_display .= ' ' . $biop_display . ' ' . $where_display . '' . $what_display; } } return $query_display; @@ -571,15 +571,15 @@ function asearch_print_query_array(&$boxes, &$query_array, &$query_keys, &$actio $show_flag = getPref($data_dir, $username, $show_pref, 0) & 1; $use_icons_flag = ($use_icons) && ($icon_theme != 'none'); if ($use_icons_flag) - $text_array = array('', - ''); + $text_array = array('', + ''); else $text_array = array('-', '+'); $toggle_link = asearch_get_toggle_link(!$show_flag, $show_pref, $text_array, array(_("Fold"), _("Unfold"))); if (!$use_icons_flag) $toggle_link = '[' . $toggle_link . ']'; - echo "
\n"; + echo "
\n"; echo html_tag('table', '', 'center', $color[9], 'width="95%" cellpadding="1" cellspacing="1" border="0"'); echo html_tag('tr', html_tag('td', $toggle_link, 'center', $color[5], 'width="5%"') @@ -701,7 +701,7 @@ function asearch_get_form_mailbox($imapConnection, &$boxes, $mailbox, $row_num = function asearch_get_form_sub($sub, $row_num = 0) { return function_exists('addCheckBox') ? addCheckBox('sub[' . $row_num .']', $sub) - : ''; + : ''; } /** Build the 2 unop and where selects @@ -719,7 +719,7 @@ function asearch_get_form_location($unop, $where, $row_num = 0) function asearch_get_form_what($what, $row_num = 0) { return function_exists('addInput') ? addInput('what[' . $row_num . ']', $what, '35') - : ''; + : ''; } /** Build the Exclude criteria checkbox @@ -727,7 +727,7 @@ function asearch_get_form_what($what, $row_num = 0) function asearch_get_form_exclude($exclude, $row_num = 0) { return function_exists('addCheckBox') ? addCheckBox('exclude['.$row_num.']', $exclude) - : ''; + : ''; } /** Print one advanced form row @@ -769,7 +769,7 @@ function asearch_print_form($imapConnection, &$boxes, $mailbox_array, $biop_arra global $color; //Search Form - echo "
\n"; + echo "
\n"; echo '
' . "\n"; echo html_tag('table', '', 'center', $color[9], 'width="100%" cellpadding="1" cellspacing="1" border="0"'); @@ -830,7 +830,7 @@ function asearch_print_form_basic($imapConnection, &$boxes, $mailbox_array, $bio global $color; //Search Form - echo "
\n"; + echo "
\n"; echo '' . "\n"; echo html_tag('table', '', 'center', $color[9], 'width="100%" cellpadding="1" cellspacing="1" border="0"'); @@ -1355,7 +1355,7 @@ if ($submit == $search_button_text) { $query_error = asearch_check_query($where_array, $what_array, $exclude_array); if ($query_error != '') - echo '
' . html_tag('div', asearch_get_error_display($color, $query_error), 'center') . "\n"; + echo '
' . html_tag('div', asearch_get_error_display($color, $query_error), 'center') . "\n"; else { // Disable thread sort for now if there is more than one mailbox or at least one 'All Folders' global $allow_thread_sort; @@ -1365,10 +1365,10 @@ if ($submit == $search_button_text) { $mboxes_array = sqimap_asearch_get_selectable_unformatted_mailboxes($boxes); $mboxes_msgs = sqimap_asearch($imapConnection, $mailbox_array, $biop_array, $unop_array, $where_array, $what_array, $exclude_array, $sub_array, $mboxes_array); if (empty($mboxes_msgs)) - echo '
' . html_tag('div', asearch_get_error_display($color, _("No Messages Found")), 'center') . "\n"; + echo '
' . html_tag('div', asearch_get_error_display($color, _("No Messages Found")), 'center') . "\n"; else { foreach($mboxes_msgs as $mailbox => $msgs) { - echo '
'; + echo '
'; $mbxresponse = sqimap_mailbox_select($imapConnection, $mailbox); $msgs = fillMessageArray($imapConnection, $msgs, count($msgs)); /* For now just keep the first criteria to make the regular search happy if the user tries to come back to search */ -- 2.25.1