From 1108e8bba7226155a2b045d2513f1759802cb3b3 Mon Sep 17 00:00:00 2001 From: lkehresman Date: Wed, 26 Apr 2000 02:17:58 +0000 Subject: [PATCH] fixed bugs with cache git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@459 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- BUG | 14 +++++++------- src/read_body.php | 5 +++++ src/right_main.php | 6 +++++- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/BUG b/BUG index b199bc28..1bd6ae2a 100644 --- a/BUG +++ b/BUG @@ -1,15 +1,15 @@ Known BUGS to be fixed before 0.4pre1: - - 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. - - When reading through 7 unread messages, every time I would read - a message and click on "Message List" to go back, they would stay - marked "unread". The caching was doing too good of a job. (: --SQUASHED-- +(lme) When reading through 7 unread messages, every time I would read + a message and click on "Message List" to go back, they would stay + marked "unread". The caching was doing too good of a job. (: +(lme) 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. (lme) LDAP preferences in conf.pl are not working. (lme) Next/Previous while viewing a message should take into account the way that the mailbox is sorted. Right now, it just does it diff --git a/src/read_body.php b/src/read_body.php index e6e000fa..4143694c 100644 --- a/src/read_body.php +++ b/src/read_body.php @@ -59,6 +59,11 @@ $currentArrayIndex = -1; } + for ($i = 0; $i < count($msgs); $i++) { + if ($msgs[$i]["ID"] == $passed_id) + $msgs[$i]["FLAG_SEEN"] = true; + } + include("../src/load_prefs.php"); $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0); sqimap_mailbox_select($imapConnection, $mailbox); diff --git a/src/right_main.php b/src/right_main.php index 3386741b..d4e613b5 100644 --- a/src/right_main.php +++ b/src/right_main.php @@ -73,7 +73,6 @@ } sqimap_mailbox_select($imapConnection, $mailbox); - $numMessages = sqimap_get_num_messages ($imapConnection, $mailbox); displayPageHeader($color, $mailbox); if (isset($newsort)) { @@ -91,6 +90,10 @@ unset($msgs); if (session_is_registered("msort")) unset($msort); + if (session_is_registered("numMessages")) + unset($numMessages); + + $numMessages = sqimap_get_num_messages ($imapConnection, $mailbox); showMessagesForMailbox($imapConnection, $mailbox, $numMessages, $startMessage, $sort, $color, $show_num, $use_mailbox_cache); @@ -98,6 +101,7 @@ session_register("msgs"); if (session_is_registered("msort") && isset($msort)) session_register("msort"); + session_register("numMessages"); } // close the connection -- 2.25.1