From 2de1b0aafe81f8eb1d76585a742b3b4b674b6d22 Mon Sep 17 00:00:00 2001 From: alec Date: Mon, 9 May 2011 08:32:13 +0000 Subject: - Fix possible ambiguity in folders caching (when list_mailboxes() was called the same result was returned, no matter what was the 1st and 2nd argument) git-svn-id: https://svn.roundcube.net/trunk@4743 208e9e7b-5314-0410-a742-e7e81cd9613c --- roundcubemail/program/include/rcube_imap.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'roundcubemail/program/include') diff --git a/roundcubemail/program/include/rcube_imap.php b/roundcubemail/program/include/rcube_imap.php index fbdaf34d5..ab2bc2a5e 100644 --- a/roundcubemail/program/include/rcube_imap.php +++ b/roundcubemail/program/include/rcube_imap.php @@ -3049,11 +3049,13 @@ class rcube_imap */ private function _list_mailboxes($root='', $name='*', $filter=null) { - $cache_key = 'mailboxes'; + $cache_key = $root.':'.$name; if (!empty($filter)) { - $cache_key .= '.'.substr((is_string($filter) ? $filter : serialize($filter)), 0, 90); + $cache_key .= ':'.(is_string($filter) ? $filter : serialize($filter)); } + $cache_key = 'mailboxes.'.md5($cache_key); + // get cached folder list $a_mboxes = $this->get_cache($cache_key); if (is_array($a_mboxes)) { -- cgit v1.2.3