Fixed object name formatting of other users folders
Fixed parent folder handling in folder_selector()
This commit is contained in:
parent
59f9b422ac
commit
90da1250b8
1 changed files with 15 additions and 4 deletions
|
@ -348,8 +348,14 @@ class rcube_kolab
|
||||||
$delim = $ns[1];
|
$delim = $ns[1];
|
||||||
// get username
|
// get username
|
||||||
$pos = strpos($folder, $delim);
|
$pos = strpos($folder, $delim);
|
||||||
|
if ($pos) {
|
||||||
$prefix = '('.substr($folder, 0, $pos).') ';
|
$prefix = '('.substr($folder, 0, $pos).') ';
|
||||||
$folder = substr($folder, $pos+1);
|
$folder = substr($folder, $pos+1);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$prefix = '('.$folder.')';
|
||||||
|
$folder = '';
|
||||||
|
}
|
||||||
$found = true;
|
$found = true;
|
||||||
$folder_ns = 'other';
|
$folder_ns = 'other';
|
||||||
break;
|
break;
|
||||||
|
@ -427,12 +433,12 @@ class rcube_kolab
|
||||||
// get all folders of specified type
|
// get all folders of specified type
|
||||||
$folders = self::get_folders($type);
|
$folders = self::get_folders($type);
|
||||||
|
|
||||||
$delim = $_SESSION['delimiter'];
|
$delim = $_SESSION['imap_delimiter'];
|
||||||
$names = array();
|
$names = array();
|
||||||
$len = strlen($current);
|
$len = strlen($current);
|
||||||
|
|
||||||
if ($len && ($rpos = strrpos($current, $delim))) {
|
if ($len && ($rpos = strrpos($current, $delim))) {
|
||||||
$parent = substr($current, 0, $rpos-1);
|
$parent = substr($current, 0, $rpos);
|
||||||
$p_len = strlen($parent);
|
$p_len = strlen($parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -457,6 +463,11 @@ class rcube_kolab
|
||||||
$names[$name] = rcube_charset_convert($name, 'UTF7-IMAP');
|
$names[$name] = rcube_charset_convert($name, 'UTF7-IMAP');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Make sure parent folder is listed (might be skipped e.g. if it's namespace root)
|
||||||
|
if ($p_len && !isset($names[$parent])) {
|
||||||
|
$names[$parent] = rcube_charset_convert($parent, 'UTF7-IMAP');
|
||||||
|
}
|
||||||
|
|
||||||
// Sort folders list
|
// Sort folders list
|
||||||
asort($names, SORT_LOCALE_STRING);
|
asort($names, SORT_LOCALE_STRING);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue