summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Machniak <machniak@kolabsys.com>2014-05-14 09:33:13 (GMT)
committerAleksander Machniak <machniak@kolabsys.com>2014-05-14 09:33:13 (GMT)
commit8a532743d9f6a702b73f2f0171e7379b4b2e2974 (patch)
tree9dcaa3775110777721829f1c6a661ea6e1a3d320
parent2706abc9af2ef200f74308854a861db24616ef5b (diff)
downloadkolab-chwala-8a532743d9f6a702b73f2f0171e7379b4b2e2974.tar.gz
Fix bug where folders list returned names encoded in UTF7-IMAP instead of UTF-8 (Bug #3055)
-rw-r--r--lib/kolab/kolab_file_storage.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/kolab/kolab_file_storage.php b/lib/kolab/kolab_file_storage.php
index eaf61cb..6acfa3e 100644
--- a/lib/kolab/kolab_file_storage.php
+++ b/lib/kolab/kolab_file_storage.php
@@ -734,16 +734,16 @@ class kolab_file_storage implements file_storage
throw new Exception("Storage error. Unable to get folders list.", file_storage::ERROR);
}
- foreach ($folders as $folder) {
- $folder = rcube_charset::convert($folder_name, 'UTF7-IMAP', RCUBE_CHARSET);
- }
-
// create 'Files' folder in case there's no folder of type 'file'
if (empty($folders)) {
if (kolab_storage::folder_create('Files', 'file')) {
$folders[] = 'Files';
}
}
+ else {
+ $callback = function($folder) { return rcube_charset::convert($folder, 'UTF7-IMAP', RCUBE_CHARSET); };
+ $folders = array_map($callback, $folders);
+ }
return $folders;
}