Fix missing parent folder in folder selector if the folder does not exist or is not accessible (#3237)
This commit is contained in:
parent
b48d9925d8
commit
28b6872b56
1 changed files with 11 additions and 7 deletions
|
@ -672,8 +672,17 @@ class kolab_storage
|
|||
$name = $c_folder->name;
|
||||
|
||||
// skip current folder and it's subfolders
|
||||
if ($len && ($name == $current || strpos($name, $current.$delim) === 0)) {
|
||||
continue;
|
||||
if ($len) {
|
||||
if ($name == $current) {
|
||||
// Make sure parent folder is listed (might be skipped e.g. if it's namespace root)
|
||||
if ($p_len && !isset($names[$parent])) {
|
||||
$names[$parent] = self::object_name($parent);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (strpos($name, $current.$delim) === 0) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// always show the parent of current folder
|
||||
|
@ -687,11 +696,6 @@ class kolab_storage
|
|||
}
|
||||
}
|
||||
|
||||
// Make sure parent folder is listed (might be skipped e.g. if it's namespace root)
|
||||
if ($p_len && !isset($names[$parent]) && strpos($name, $parent.$delim) === 0) {
|
||||
$names[$parent] = self::object_name($parent);
|
||||
}
|
||||
|
||||
$names[$name] = self::object_name($name);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue