From e452ce9b159ee616915c2ca809a6da3f97b2c60b Mon Sep 17 00:00:00 2001 From: lkehresman Date: Thu, 20 Apr 2000 03:46:11 +0000 Subject: [PATCH] made sorting method persistant using session management git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@444 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- BUG | 21 ++++++++++--------- functions/mailbox_display.php | 38 +++++++++++++++++------------------ src/right_main.php | 5 +++++ 3 files changed, 35 insertions(+), 29 deletions(-) diff --git a/BUG b/BUG index f8becbd1..3922d0b2 100644 --- a/BUG +++ b/BUG @@ -1,32 +1,33 @@ Known BUGS to be fixed before 0.4pre1: - - Reply which sets the address line to something like the following: - "Luke Ehresman " (without quotes) - translates to the SMTP server as: - > - - LDAP preferences in conf.pl are not working. - Next/Previous while viewing a message should take into account the way that the mailbox is sorted. Right now, it just does it by the next message id. - - The icon for message sorting doesn't always stay. It usually - reverts back to the date. - - If a new message comes in while still browsing cached message list, the space is allocated, but it is blank. (lme) I'm not convinced that the cache gets deleted all the time. I'll look into this one. - - Special folders don't get listed at the top of folder list - - In UW, removing folders with a / at the end is broke --SQUASHED-- +(lme) Special folders don't get listed at the top of folder list + +(lme) The icon for message sorting doesn't always stay. It usually + reverts back to the date. + (lme) There is an infinate loop when moving messages to other folders, thus breaking the move, and delete buttons. + +(lme) Reply which sets the address line to something like the following: + "Luke Ehresman " (without quotes) + translates to the SMTP server as: + > + diff --git a/functions/mailbox_display.php b/functions/mailbox_display.php index 675735d2..f19f1f50 100644 --- a/functions/mailbox_display.php +++ b/functions/mailbox_display.php @@ -26,7 +26,7 @@ echo " \n"; echo " $bold$flag$senderName$flag_end$bold_end\n"; echo "
$bold$flag".$msg["DATE_STRING"]."$flag_end$bold_end
\n"; - echo " $bold$flag$subject$flag_end$ans$bold_end\n"; + echo " $bold$flag$subject$flag_end$ans$bold_end\n"; echo "\n"; } @@ -159,23 +159,23 @@ echo ""; if (($nextGroup <= $numMessages) && ($prevGroup >= 0)) { - echo "". _("Previous") ."\n"; - echo "". _("Next") ."\n"; + echo "". _("Previous") ."\n"; + echo "". _("Next") ."\n"; } else if (($nextGroup > $numMessages) && ($prevGroup >= 0)) { - echo "". _("Previous") ."\n"; + echo "". _("Previous") ."\n"; echo "Next\n"; } else if (($nextGroup <= $numMessages) && ($prevGroup < 0)) { echo "Previous\n"; - echo "". _("Next") ."\n"; + echo "". _("Next") ."\n"; } echo "\n"; /** The delete and move options */ echo ""; - echo "\n\n\n
"; + echo "\n\n\n"; echo "\n"; echo " \n"; echo " \n"; + echo " \n"; else if ($sort == 3) - echo " \n"; + echo " \n"; else - echo " \n"; + echo " \n"; /** DATE HEADER **/ echo " \n"; + echo " \n"; else if ($sort == 1) - echo " \n"; + echo " \n"; else - echo " \n"; + echo " \n"; /** SUBJECT HEADER **/ echo " \n"; + echo " \n"; else if ($sort == 5) - echo " \n"; + echo " \n"; else - echo " \n"; + echo " \n"; echo ""; @@ -268,16 +268,16 @@ echo "
\n"; @@ -207,27 +207,27 @@ /** FROM HEADER **/ echo " ". _("From") .""; if ($sort == 2) - echo " ". _("Date") .""; if ($sort == 0) - echo " ". _("Subject") ."\n"; if ($sort == 4) - echo "
"; if (($nextGroup <= $numMessages) && ($prevGroup >= 0)) { - echo "" . _("Previous") . "\n"; - echo "" . _("Next") . "\n"; + echo "" . _("Previous") . "\n"; + echo "" . _("Next") . "\n"; } else if (($nextGroup > $numMessages) && ($prevGroup >= 0)) { - echo "" . _("Previous") . "\n"; + echo "" . _("Previous") . "\n"; echo "" . _("Next") . "\n"; } else if (($nextGroup <= $numMessages) && ($prevGroup < 0)) { echo "Previous\n"; - echo "" . _("Next") . "\n"; + echo "" . _("Next") . "\n"; } echo "
"; /** End of message-list table */ } diff --git a/src/right_main.php b/src/right_main.php index 94fba8c8..3386741b 100644 --- a/src/right_main.php +++ b/src/right_main.php @@ -76,6 +76,11 @@ $numMessages = sqimap_get_num_messages ($imapConnection, $mailbox); displayPageHeader($color, $mailbox); + if (isset($newsort)) { + $sort = $newsort; + session_register("sort"); + } + // Check to see if we can use cache or not. Currently the only time when you wont use it is // when a link on the left hand frame is used. Also check to make sure we actually have the // array in the registered session data. :) -- 2.25.1