diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2012-01-13 08:20:30 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2012-01-13 08:20:30 +0000 |
| commit | c39d008ec66c5c528f63f760083f7c6d253395db (patch) | |
| tree | 1131eedfbecc11fcdb239f9afc04dc356809d70b /plugins/acl | |
| parent | 255033a27f13b7d6ffbd0e1079301949d792f185 (diff) | |
- Use storage object
git-svn-id: https://svn.roundcube.net/trunk@5764 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'plugins/acl')
| -rw-r--r-- | plugins/acl/acl.php | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/plugins/acl/acl.php b/plugins/acl/acl.php index b2e5b8d47..dcc249421 100644 --- a/plugins/acl/acl.php +++ b/plugins/acl/acl.php @@ -58,8 +58,7 @@ class acl extends rcube_plugin $action = trim(get_input_value('_act', RCUBE_INPUT_GPC)); // Connect to IMAP - $this->rc->imap_init(); - $this->rc->imap_connect(); + $this->rc->storage_init(); // Load localization and configuration $this->add_texts('localization/'); @@ -151,7 +150,7 @@ class acl extends rcube_plugin } // Do nothing if no ACL support - if (!$this->rc->imap->get_capability('ACL')) { + if (!$this->rc->storage->get_capability('ACL')) { return $args; } @@ -335,7 +334,7 @@ class acl extends rcube_plugin private function list_rights($attrib=array()) { // Get ACL for the folder - $acl = $this->rc->imap->get_acl($this->mbox); + $acl = $this->rc->storage->get_acl($this->mbox); if (!is_array($acl)) { $acl = array(); @@ -395,7 +394,7 @@ class acl extends rcube_plugin $i = 1; $js_table = array(); foreach ($acl as $user => $rights) { - if ($this->rc->imap->conn->user == $user) { + if ($this->rc->storage->conn->user == $user) { continue; } @@ -462,7 +461,7 @@ class acl extends rcube_plugin } if ($user != $_SESSION['username'] && $username != $_SESSION['username']) { - if ($this->rc->imap->set_acl($mbox, $user, $acl)) { + if ($this->rc->storage->set_acl($mbox, $user, $acl)) { $ret = array('id' => html_identifier($user), 'username' => $username, 'acl' => implode($acl), 'old' => $oldid); $this->rc->output->command('acl_update', $ret); @@ -491,7 +490,7 @@ class acl extends rcube_plugin foreach ($user as $u) { $u = trim($u); - if ($this->rc->imap->delete_acl($mbox, $u)) { + if ($this->rc->storage->delete_acl($mbox, $u)) { $this->rc->output->command('acl_remove_row', html_identifier($u)); } else { @@ -603,7 +602,7 @@ class acl extends rcube_plugin return $this->supported; } - $capa = $this->rc->imap->get_capability('RIGHTS'); + $capa = $this->rc->storage->get_capability('RIGHTS'); if (is_array($capa)) { $rights = strtolower($capa[0]); @@ -636,7 +635,7 @@ class acl extends rcube_plugin // whether or not the user ID in ACL entries need to be qualified and how // they would need to be qualified. if (empty($domain)) { - $acl = $this->rc->imap->get_acl('INBOX'); + $acl = $this->rc->storage->get_acl('INBOX'); if (is_array($acl)) { $regexp = '/^' . preg_quote($_SESSION['username'], '/') . '@(.*)$/'; foreach (array_keys($acl) as $name) { |
