diff --git a/plugins/libkolab/lib/kolab_storage_config.php b/plugins/libkolab/lib/kolab_storage_config.php index 0097741a..b82a4a96 100644 --- a/plugins/libkolab/lib/kolab_storage_config.php +++ b/plugins/libkolab/lib/kolab_storage_config.php @@ -322,16 +322,7 @@ class kolab_storage_config $path = array_map('rawurldecode', $path); // resolve folder name - if ($ns == 'shared') { - $folder = implode('/', $path); - // Note: this assumes there's only one shared namespace root - if ($ns = $storage->get_namespace('shared')) { - if ($prefix = $ns[0][0]) { - $folder = $prefix . 'shared/' . $folder; - } - } - } - else if ($ns == 'user') { + if ($ns == 'user') { $username = array_shift($path); $folder = implode('/', $path); @@ -350,7 +341,13 @@ class kolab_storage_config } } else { - return; + $folder = $ns . '/' . implode('/', $path); + // Note: this assumes there's only one shared namespace root + if ($ns = $storage->get_namespace('shared')) { + if ($prefix = $ns[0][0]) { + $folder = $prefix . $folder; + } + } } return array( diff --git a/plugins/libkolab/tests/kolab_storage_config.php b/plugins/libkolab/tests/kolab_storage_config.php index 7e66cc47..65cbdfd5 100644 --- a/plugins/libkolab/tests/kolab_storage_config.php +++ b/plugins/libkolab/tests/kolab_storage_config.php @@ -16,7 +16,7 @@ class kolab_storage_config_test extends PHPUnit_Framework_TestCase 'uid' => '4', 'message-id' => '<5270122@example.org>', 'date' => 'Mon, 20 Apr 2015 16:33:03 +0200', - 'subject' => 'Catch me if you can', + 'subject' => 'Shared', ); private $url_shared = 'imap:///shared/Collected/4?message-id=%3C5270122%40example.org%3E&date=Mon%2C+20+Apr+2015+16%3A33%3A03+%2B0200&subject=Shared';