From c814f7770c7aabd6d82f01d4bc7e7869f1d7cff1 Mon Sep 17 00:00:00 2001 From: alec Date: Fri, 17 Jun 2011 08:07:43 +0000 Subject: - IMproved namespace roots handling git-svn-id: https://svn.roundcube.net/trunk@4861 208e9e7b-5314-0410-a742-e7e81cd9613c --- plugins/acl/acl.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'plugins/acl/acl.php') diff --git a/plugins/acl/acl.php b/plugins/acl/acl.php index 68d7ff887..f0c42d2c6 100644 --- a/plugins/acl/acl.php +++ b/plugins/acl/acl.php @@ -96,8 +96,8 @@ class acl extends rcube_plugin return $args; } */ - // Do nothing if no ACL support - if (!$this->rc->imap->get_capability('ACL')) { + // Namespace root + if ($args['options']['is_root']) { return $args; } @@ -106,6 +106,11 @@ class acl extends rcube_plugin return $args; } + // Do nothing if no ACL support + if (!$this->rc->imap->get_capability('ACL')) { + return $args; + } + // Load localization and include scripts $this->load_config(); $this->add_texts('localization/', array('deleteconfirm', 'norights', @@ -211,7 +216,7 @@ class acl extends rcube_plugin . html::label(array('for' => $id, 'title' => $this->gettext('longacl'.$key)), $this->gettext('acl'.$key))); } - + $out .= "\n" . html::tag('ul', $attrib, $ul, html::$common_attrib); $this->rc->output->set_env('acl_items', $items); @@ -441,7 +446,7 @@ class acl extends rcube_plugin // Save state in user preferences $this->rc->user->save_prefs(array('acl_advanced_mode' => $advanced)); - + $out = $this->list_rights(); $out = preg_replace(array('/^]+>/', '/<\/table>$/'), '', $out); @@ -455,7 +460,7 @@ class acl extends rcube_plugin * @param array $rights MYRIGHTS result * * @return string HTML content - */ + */ function acl2text($rights) { if (empty($rights)) { -- cgit v1.2.3