diff --git a/plugins/libkolab/lib/kolab_storage.php b/plugins/libkolab/lib/kolab_storage.php --- a/plugins/libkolab/lib/kolab_storage.php +++ b/plugins/libkolab/lib/kolab_storage.php @@ -859,27 +859,8 @@ return $folders; } - $prefix = $root . $mbox; $regexp = '/^' . preg_quote($filter, '/') . '(\..+)?$/'; - // get folders types for all folders - $folderdata = self::folders_typedata($prefix); - - if (!is_array($folderdata)) { - return array(); - } - - // In some conditions we can skip LIST command (?) - if (!$subscribed && $filter != 'mail' && $prefix == '*') { - foreach ($folderdata as $folder => $type) { - if (!preg_match($regexp, $type)) { - unset($folderdata[$folder]); - } - } - - return self::$imap->sort_folder_list(array_keys($folderdata), true); - } - // Get folders list if ($subscribed) { $folders = self::_imap_list_subscribed($root, $mbox); @@ -895,7 +876,7 @@ // Filter folders list foreach ($folders as $idx => $folder) { - $type = $folderdata[$folder]; + $type = self::folder_type($folder); if ($filter == 'mail' && empty($type)) { continue;