Fix parent folder permissions checking. See http://trac.roundcube.net/ticket/1488443

This commit is contained in:
Aleksander Machniak 2012-04-18 19:50:46 +02:00
parent bda8aa02b6
commit 3aab9325f1
2 changed files with 2 additions and 2 deletions

View file

@ -294,7 +294,7 @@ class kolab_driver extends calendar_driver
$this->rc->imap_connect();
$parent_opts = $this->rc->imap->mailbox_info($parent);
if ($parent_opts['namespace'] != 'personal'
&& (empty($parent_opts['rights']) || !preg_match('/[ck]/', implode($parent_opts)))
&& (empty($parent_opts['rights']) || !preg_match('/[ck]/', implode($parent_opts['rights'])))
) {
$this->last_error = 'No permission to create folder';
return false;

View file

@ -467,7 +467,7 @@ class kolab_addressbook extends rcube_plugin
$this->rc->imap_connect();
$parent_opts = $this->rc->imap->mailbox_info($path);
if ($parent_opts['namespace'] != 'personal'
&& (empty($parent_opts['rights']) || !preg_match('/[ck]/', implode($parent_opts)))
&& (empty($parent_opts['rights']) || !preg_match('/[ck]/', implode($parent_opts['rights'])))
) {
$error = rcube_label('parentnotwritable');
}