From df98cf5cf1607dbdf53fc07d49909defc033de92 Mon Sep 17 00:00:00 2001 From: fidian Date: Wed, 18 Oct 2000 16:03:55 +0000 Subject: [PATCH] Searches now show proper headers for the columns of data for the messages found. Display of empty mailbox table cell now has proper column number. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@807 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/imap_search.php | 60 +++++++++++++++++++++++++++-------- functions/mailbox_display.php | 3 +- 2 files changed, 49 insertions(+), 14 deletions(-) diff --git a/functions/imap_search.php b/functions/imap_search.php index c8d9777b..086fa085 100644 --- a/functions/imap_search.php +++ b/functions/imap_search.php @@ -16,7 +16,7 @@ $imap_search_php = true; function sqimap_search($imapConnection,$search_where,$search_what,$mailbox,$color) { - global $msgs, $message_highlight_list, $squirrelmail_language, $languages; + global $msgs, $message_highlight_list, $squirrelmail_language, $languages, $index_order; $urlMailbox = urlencode($mailbox); # Construct the Search QuERY @@ -133,7 +133,7 @@ function sqimap_search($imapConnection,$search_where,$search_what,$mailbox,$colo echo ""; echo "\n\n\n
"; - echo "\n"; + echo "
\n"; echo " \n"; echo "
\n"; echo " ". _("Move selected to:") .""; @@ -161,17 +161,51 @@ function sqimap_search($imapConnection,$search_where,$search_what,$mailbox,$colo echo "
"; echo ""; echo ""; - echo " "; - /** FROM HEADER **/ - if ($mailbox == $sent_folder) - echo " "; - else - echo " "; - /** DATE HEADER **/ - echo " "; - echo " \n"; - /** SUBJECT HEADER **/ - echo " \n"; + + for ($i=1; $i <= count($index_order); $i++) { + switch ($index_order[$i]) { + case 1: # checkbox + echo " "; + break; + case 2: # from + if ($mailbox == $sent_folder) + echo " \n"; + else if ($sort == 3) + echo " \n"; + else + echo " \n"; + break; + case 3: # date + echo " \n"; + else if ($sort == 1) + echo " \n"; + else + echo " \n"; + break; + case 4: # subject + echo " \n"; + else if ($sort == 5) + echo " \n"; + else + echo " \n"; + break; + case 5: # flags + echo " \n"; + break; + case 6: # size + echo " \n"; + break; + } + } echo ""; while ($j < count($msgs)) { diff --git a/functions/mailbox_display.php b/functions/mailbox_display.php index 1bcd9bf6..3268d5c7 100644 --- a/functions/mailbox_display.php +++ b/functions/mailbox_display.php @@ -356,7 +356,8 @@ // loop through and display the info for each message. $t = 0; // $t is used for the checkbox number if ($numMessages == 0) { // if there's no messages in this folder - echo ""; + echo ""; } else if ($startMessage == $endMessage) { // if there's only one message in the box, handle it different. $i = $startMessage; reset($msort); -- 2.25.1
 ". _("To") ."". _("From") ."". _("Date") ." ". _("Subject") ." ". _("To") .""; + else + echo " ". _("From") .""; + + if ($sort == 2) + echo " ". _("Date") .""; + if ($sort == 0) + echo " ". _("Subject") ."\n"; + if ($sort == 4) + echo "  " . _("Size")."

". _("THIS FOLDER IS EMPTY") ."
 

". _("THIS FOLDER IS EMPTY") ."