summaryrefslogtreecommitdiff
path: root/roundcubemail/program/include
diff options
context:
space:
mode:
authorroundcube <roundcube@208e9e7b-5314-0410-a742-e7e81cd9613c>2005-11-07 00:32:57 +0000
committerroundcube <roundcube@208e9e7b-5314-0410-a742-e7e81cd9613c>2005-11-07 00:32:57 +0000
commit0a908241724356311419e8823440cae744a4ba6a (patch)
tree867193c17e5c28b6ef0fbc2165f081a5c4b86c4a /roundcubemail/program/include
parentc7f6657ede302893c592bf7fc2b649d86754df1a (diff)
Minor bugfixes
git-svn-id: https://svn.roundcube.net/trunk@80 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include')
-rw-r--r--roundcubemail/program/include/main.inc1
-rw-r--r--roundcubemail/program/include/rcube_imap.inc9
2 files changed, 10 insertions, 0 deletions
diff --git a/roundcubemail/program/include/main.inc b/roundcubemail/program/include/main.inc
index 5895807a9..adb0b8822 100644
--- a/roundcubemail/program/include/main.inc
+++ b/roundcubemail/program/include/main.inc
@@ -573,6 +573,7 @@ function parse_template($name='main', $exit=TRUE)
// replace all strings ($varname) with the content of the according global variable
function parse_with_globals($input)
{
+ $GLOBALS['__comm_path'] = $GLOBALS['COMM_PATH'];
$output = preg_replace('/\$(__[a-z0-9_\-]+)/e', '$GLOBALS["\\1"]', $input);
return $output;
}
diff --git a/roundcubemail/program/include/rcube_imap.inc b/roundcubemail/program/include/rcube_imap.inc
index 8253442ab..44ef24830 100644
--- a/roundcubemail/program/include/rcube_imap.inc
+++ b/roundcubemail/program/include/rcube_imap.inc
@@ -464,6 +464,7 @@ class rcube_imap
// sort headers by a specific col
$a_headers = iil_SortHeaders($a_msg_headers, $sort_field, $sort_order);
+ $headers_count = count($a_headers);
// free memory
unset($a_msg_headers);
@@ -471,6 +472,14 @@ class rcube_imap
// write headers list to cache
if (!$headers_cached)
$this->update_cache($mailbox.'.msg', $a_headers);
+
+ // update message count cache
+ $a_mailbox_cache = $this->get_cache('messagecount');
+ if (isset($a_mailbox_cache[$mailbox]['ALL']) && $a_mailbox_cache[$mailbox]['ALL'] != $headers_count)
+ {
+ $a_mailbox_cache[$mailbox]['ALL'] = (int)$headers_count;
+ $this->update_cache('messagecount', $a_mailbox_cache);
+ }
if (empty($a_headers))
return array();