From 6332704d9e75c774f164dda49a29f87a3454f789 Mon Sep 17 00:00:00 2001 From: thomppj Date: Thu, 25 Oct 2001 04:18:47 +0000 Subject: [PATCH] Added mark as read/unread functionality. Rearrange UI of right_main's grey action bar to accomodate additional buttons. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1606 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/mailbox_display.php | 37 +++++++++++++++++++++-------------- src/move_messages.php | 10 ++++++++-- 2 files changed, 30 insertions(+), 17 deletions(-) diff --git a/functions/mailbox_display.php b/functions/mailbox_display.php index cad21478..1272d5a3 100644 --- a/functions/mailbox_display.php +++ b/functions/mailbox_display.php @@ -517,11 +517,10 @@ global $color, $index_order, $auto_expunge, $move_to_trash; global $checkall, $sent_folder; $urlMailbox = urlencode($mailbox); - /** This is the beginning of the message list table. It wraps around all messages */ - echo ''; - if ($Message) - { + /** This is the beginning of the message list table. It wraps around all messages */ + echo '
'; + if ($Message) { echo "\n"; } @@ -529,7 +528,6 @@ echo '
$Message
'; echo "$More\n"; ShowSelectAllLink($startMessage, $sort); - echo '
'; /** The delete and move options */ @@ -537,12 +535,19 @@ echo "\n
\n"; echo "\n"; - echo " \n"; - echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; - echo " \n"; + echo " \n"; echo " \n"; - echo "
\n"; - - echo ' '. _("Move selected to:") .''; - echo '
\n"; + echo '  ' . _("Move selected to:") . "\n"; + echo "  \n"; + echo '  ' . _("Transform Selected Messages") . ":
\n"; + echo "
\n"; + echo '    '; - echo ' \n"; + echo " \n"; echo " \n"; + echo "     \n"; if (! $auto_expunge) { - echo '  '. _("mailbox") ."  \n"; + echo '  '. _("mailbox") ." \n"; } - echo "  ". _("checked messages") ."\n"; + echo " \n"; + echo " \n"; + echo "  \n"; echo "
\n"; do_hook('mailbox_form_before'); echo ''; diff --git a/src/move_messages.php b/src/move_messages.php index bd87a9e0..f4080b47 100644 --- a/src/move_messages.php +++ b/src/move_messages.php @@ -87,7 +87,13 @@ // loop because we never increment j. so check to see if msg[0] is set or not to fix this. while ($j < count($msg)) { if (isset($msg[$i])) { - sqimap_messages_delete($imapConnection, $msg[$i], $msg[$i], $mailbox); + if (isset($markRead)) { + sqimap_messages_flag($imapConnection, $msg[$i], $msg[$i], "Seen"); + } else if (isset($markRead)) { + sqimap_messages_remove_flag($imapConnection, $msg[$i], $msg[$i], "Seen"); + } else { + sqimap_messages_delete($imapConnection, $msg[$i], $msg[$i], $mailbox); + } $j++; } $i++; @@ -139,4 +145,4 @@ sqimap_logout($imapConnection); ?> - \ No newline at end of file + -- 2.25.1