Aleksander Machniak
2013-12-01 38bf401cf88bc88d3b4d96fee8d2166cc2cac8c6
Fix performance of listing writeable folders (#1489451)
2 files modified
11 ■■■■■ changed files
CHANGELOG 2 ●●●●● patch | view | raw | blame | history
program/lib/Roundcube/rcube_imap.php 9 ●●●●● patch | view | raw | blame | history
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)
program/lib/Roundcube/rcube_imap.php
@@ -2843,12 +2843,21 @@
    /**
     * 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]);
            }