From 6dee834ca06f449cc9a1d99d98979cc1ab12e12a Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Fri, 29 Nov 2013 19:34:12 +0100 Subject: [PATCH 1/2] Prepare release --- CHANGELOG | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 3eca15023..e485ff6eb 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,8 @@ CHANGELOG Roundcube Webmail =========================== +RELEASE 1.0-beta +---------------- - Fix handling of invalid closing tags in HTML messages (#1489446) - Set real content-type for file downloads (#1489439) - Update TinyMCE to version 3.5.10 (#1489442) From 38bf401cf88bc88d3b4d96fee8d2166cc2cac8c6 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Sun, 1 Dec 2013 10:55:13 +0100 Subject: [PATCH 2/2] Fix performance of listing writeable folders (#1489451) --- CHANGELOG | 2 ++ program/lib/Roundcube/rcube_imap.php | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index e485ff6eb..ee80c5533 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,8 @@ CHANGELOG Roundcube Webmail =========================== +- Fix performance of listing writeable folders (#1489451) + RELEASE 1.0-beta ---------------- - Fix handling of invalid closing tags in HTML messages (#1489446) diff --git a/program/lib/Roundcube/rcube_imap.php b/program/lib/Roundcube/rcube_imap.php index fdda1d4b2..dc5305808 100644 --- a/program/lib/Roundcube/rcube_imap.php +++ b/program/lib/Roundcube/rcube_imap.php @@ -2843,12 +2843,21 @@ class rcube_imap extends rcube_storage /** * Filter the given list of folders according to access rights + * + * For performance reasons we assume user has full rights + * on all personal folders. */ protected function filter_rights($a_folders, $rights) { $regex = '/('.$rights.')/'; + foreach ($a_folders as $idx => $folder) { + if ($this->folder_namespace($folder) == 'personal') { + continue; + } + $myrights = join('', (array)$this->my_rights($folder)); + if ($myrights !== null && !preg_match($regex, $myrights)) { unset($a_folders[$idx]); }