Aleksander Machniak
2014-09-03 334bc9792789732fd5657df5abb233ad0c2da512
program/lib/Roundcube/rcube_imap.php
@@ -3165,6 +3165,16 @@
        $result = $this->conn->createFolder($folder, $type ? array("\\" . ucfirst($type)) : null);
        // it's quite often situation that we're trying to create and subscribe
        // a folder that already exist, but is unsubscribed
        if (!$result) {
            if ($this->get_response_code() == rcube_storage::ALREADYEXISTS
                || preg_match('/already exists/i', $this->get_error_str())
            ) {
                $result = true;
            }
        }
        // try to subscribe it
        if ($result) {
            // clear cache
@@ -3942,7 +3952,9 @@
            // @TODO: Honor MAXSIZE and DEPTH options
            foreach ($queries as $attrib => $entry) {
                if ($result = $this->conn->getAnnotation($folder, $entry, $attrib)) {
                    $res = array_merge_recursive($res, $result);
                    foreach ($result as $folder => $data) {
                        $res[$folder] = array_merge((array) $res[$folder], $data);
                    }
                }
            }
        }