Fix (again) handling of shared folders in relation member URIs (#5006)
This commit is contained in:
parent
5424cdbfc4
commit
5cbcf8381c
2 changed files with 9 additions and 12 deletions
|
@ -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(
|
||||
|
|
|
@ -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';
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue