diff --git a/plugins/kolab_delegation/kolab_delegation_engine.php b/plugins/kolab_delegation/kolab_delegation_engine.php index a286e4b2..48c934b2 100644 --- a/plugins/kolab_delegation/kolab_delegation_engine.php +++ b/plugins/kolab_delegation/kolab_delegation_engine.php @@ -109,7 +109,7 @@ class kolab_delegation_engine $folders = $update ? $this->list_folders($uid) : array(); foreach ($acl as $folder_name => $rights) { - $r = $right_types[$rights]; + $r = $right_types[$rights] ?? null; if ($r) { $storage->set_acl($folder_name, $uid, $r); } @@ -123,7 +123,7 @@ class kolab_delegation_engine } foreach ($folders as $folder_name => $folder) { - if ($folder['rights']) { + if (!empty($folder['rights'])) { $storage->delete_acl($folder_name, $uid); } } diff --git a/plugins/kolab_folders/kolab_folders.php b/plugins/kolab_folders/kolab_folders.php index a6f7fb0f..340901fe 100644 --- a/plugins/kolab_folders/kolab_folders.php +++ b/plugins/kolab_folders/kolab_folders.php @@ -234,7 +234,7 @@ class kolab_folders extends rcube_plugin $subtype = ''; if (strlen($mbox)) { list($ctype, $subtype) = $this->get_folder_type($mbox); - if (strlen($args['parent_name']) && $subtype == 'default') { + if (isset($args['parent_name']) && strlen($args['parent_name']) && $subtype == 'default') { $subtype = ''; // there can be only one } } diff --git a/plugins/libkolab/lib/kolab_storage.php b/plugins/libkolab/lib/kolab_storage.php index 893af60b..9f4791e5 100644 --- a/plugins/libkolab/lib/kolab_storage.php +++ b/plugins/libkolab/lib/kolab_storage.php @@ -545,7 +545,7 @@ class kolab_storage } } - if (!empty($options) && ($options['protected'] || $options['norename'])) { + if (!empty($options) && (!empty($options['protected']) || !empty($options['norename']))) { $folder = $oldfolder; } else if (strlen($parent)) { @@ -1101,13 +1101,13 @@ class kolab_storage if (!empty($parents)) { $parents = array_reverse($parents); foreach ($parents as $parent) { - $parent_node = $refs[$parent->parent] ?: $tree; + $parent_node = !empty($refs[$parent->parent]) ? $refs[$parent->parent] : $tree; $parent_node->children[] = $parent; $_folders[] = $parent; } } - $parent_node = $refs[$folder->parent] ?: $tree; + $parent_node = !empty($refs[$folder->parent]) ? $refs[$folder->parent] : $tree; $parent_node->children[] = $folder; } diff --git a/plugins/libkolab/lib/kolab_utils.php b/plugins/libkolab/lib/kolab_utils.php index 571bf286..d80d0140 100644 --- a/plugins/libkolab/lib/kolab_utils.php +++ b/plugins/libkolab/lib/kolab_utils.php @@ -48,7 +48,7 @@ class kolab_utils // create form output foreach ($form as $tab) { - if (is_array($tab['fields']) && empty($tab['content'])) { + if (isset($tab['fields']) && is_array($tab['fields']) && empty($tab['content'])) { $table = new html_table(array('cols' => 2, 'class' => 'propform')); foreach ($tab['fields'] as $col => $colprop) { $label = !empty($colprop['label']) ? $colprop['label'] : $rcmail->gettext("$domain.$col"); @@ -88,6 +88,10 @@ class kolab_utils 'name' => $folder )); - return $acl['form']['sharing']['content'] ?: html::div('hint', $rcmail->gettext('libkolab.aclnorights')); + if (!empty($acl['form']['sharing']['content'])) { + return $acl['form']['sharing']['content']; + } + + return html::div('hint', $rcmail->gettext('libkolab.aclnorights')); } }