diff --git a/plugins/kolab_core/rcube_kolab.php b/plugins/kolab_core/rcube_kolab.php index 68c860f1..052751f2 100644 --- a/plugins/kolab_core/rcube_kolab.php +++ b/plugins/kolab_core/rcube_kolab.php @@ -290,20 +290,23 @@ class rcube_kolab $folder = $kolab->getFolder($oldname); $folder->setFolder($newname); - // We're not using $folder->save() because some caching issues $result = $kolab->rename($folder); - if (is_a($result, 'PEAR_Error')) { return false; } - // need to re-set some properties - $folder->name = $folder->new_name; - $folder->new_name = null; - $folder->_title = null; - $folder->_owner = null; - // resetting _data prevents from some wierd cache unserialization issue - $folder->_data = null; + // @TODO: Horde doesn't update subfolders cache nor subscriptions + // but we cannot use Roundcube imap object here, because + // when two connections are used in one request and we have + // multi-server configuration, updating the cache after all + // would get wrong information (e.g. annotations) + + // Reset the List object and cache + $kolab = null; + if (self::$cache) { + self::$list = null; + self::$cache->remove('mailboxes', true); + } return true; }