Check getACL() result to prevent from PHP error when PEAR_Error is returned

This commit is contained in:
Aleksander Machniak (Kolab Systems) 2011-07-25 12:33:44 +02:00
parent 0bc55bd1e0
commit dddcc2fa60
2 changed files with 12 additions and 8 deletions

View file

@ -67,12 +67,14 @@ class kolab_calendar
}
else {
$acl = $this->storage->_folder->getACL();
if (is_array($acl)) {
$acl = $acl[$_SESSION['username']];
if (strpos($acl, 'i') !== false)
$this->readonly = false;
}
}
}
}
/**

View file

@ -128,6 +128,7 @@ class rcube_kolab_contacts extends rcube_addressbook
}
else {
$acl = $this->storagefolder->getACL();
if (is_array($acl)) {
$acl = $acl[$_SESSION['username']];
if (strpos($acl, 'i') !== false)
$this->readonly = false;
@ -136,6 +137,7 @@ class rcube_kolab_contacts extends rcube_addressbook
}
}
}
}
/**