From d215ca7d2c8b0082212f6aef67fe7682627932e4 Mon Sep 17 00:00:00 2001 From: stekkel Date: Tue, 30 Jul 2002 11:42:18 +0000 Subject: [PATCH] where/what support git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@3183 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/mailbox_display.php | 14 +++++++++----- src/read_body.php | 9 ++++----- src/search.php | 10 +++++----- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/functions/mailbox_display.php b/functions/mailbox_display.php index a7af8bdf..0a139ed1 100644 --- a/functions/mailbox_display.php +++ b/functions/mailbox_display.php @@ -15,13 +15,13 @@ require_once('../functions/strings.php'); require_once('../functions/html.php'); require_once('../class/html.class.php'); -require_once('../functions/imap_utf7_decode_local.php'); +require_once('../functions/imap_mailbox.php'); /* Default value for page_selector_max. */ define('PG_SEL_MAX', 10); function printMessageInfo($imapConnection, $t, $i, $key, $mailbox, - $start_msg) { + $start_msg, $where, $what) { global $checkall, $color, $msgs, $msort, $default_use_priority, @@ -109,6 +109,11 @@ function printMessageInfo($imapConnection, $t, $i, $key, $mailbox, $fontstr_end = ''; } + if ($where && $what) { + $searchstr = '&where='.$where.'&what='.$what; + } else { + $searchstr = ''; + } /** * AAAAH! Make my eyes stop bleeding! * Who wrote this?! @@ -178,8 +183,7 @@ function printMessageInfo($imapConnection, $t, $i, $key, $mailbox, } $td_str .= ''._("Message List").''; + $s .= ''.$msgs_str.''; $s .= $topbar_delimiter; $delete_url = $base_uri . 'src/delete_message.php?mailbox='.$urlMailbox. diff --git a/src/search.php b/src/search.php index cdd37727..3acc5b12 100644 --- a/src/search.php +++ b/src/search.php @@ -12,7 +12,7 @@ require_once('../src/validate.php'); require_once('../functions/imap.php'); require_once('../functions/imap_search.php'); -require_once('../functions/imap_utf7_decode_local.php'); +require_once('../functions/imap_mailbox.php'); require_once('../functions/array.php'); require_once('../functions/strings.php'); @@ -159,7 +159,7 @@ function save_recent($save_index, $username, $data_dir) { } } -function printSearchMessages($msgs,$mailbox, $cnt, $imapConnection, $usecache = false, $newsort = false) { +function printSearchMessages($msgs,$mailbox, $cnt, $imapConnection, $where, $what, $usecache = false, $newsort = false) { global $sort, $color; $msort = calc_msort($msgs, $sort); @@ -181,7 +181,7 @@ function printSearchMessages($msgs,$mailbox, $cnt, $imapConnection, $usecache = printHeader($mailbox, 6, $color, false); displayMessageArray($imapConnection, $cnt, 1, - $msort, $mailbox, $sort, $color, $cnt); + $msort, $mailbox, $sort, $color, $cnt, $where, $what); mail_message_listing_end($cnt, '', $msg_cnt_str, $color); } @@ -448,7 +448,7 @@ if ($search_all == 'all') { $msgs = sqimap_search($imapConnection, $where, $what, $mailbox, $color, 0, $search_all, $count_all); $count_all = count($msgs); printSearchMessages($msgs, $mailbox, $count_all, $imapConnection, - false, false); + $where, $what, false, false); array_push($perbox_count, $count_all); } } @@ -472,7 +472,7 @@ else { $msgs = sqimap_search($imapConnection, $where, $what, $mailbox, $color, 0, $search_all, $count_all); if (count($msgs)) { printSearchMessages($msgs, $mailbox, count($msgs), $imapConnection, - false, false); + $where, $what, false, false); } else { echo '
' . _("No Messages Found") . '
'; } -- 2.25.1