Check getACL() result to prevent from PHP error when PEAR_Error is returned
This commit is contained in:
parent
0bc55bd1e0
commit
dddcc2fa60
2 changed files with 12 additions and 8 deletions
|
@ -67,9 +67,11 @@ class kolab_calendar
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$acl = $this->storage->_folder->getACL();
|
$acl = $this->storage->_folder->getACL();
|
||||||
$acl = $acl[$_SESSION['username']];
|
if (is_array($acl)) {
|
||||||
if (strpos($acl, 'i') !== false)
|
$acl = $acl[$_SESSION['username']];
|
||||||
$this->readonly = false;
|
if (strpos($acl, 'i') !== false)
|
||||||
|
$this->readonly = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -128,11 +128,13 @@ class rcube_kolab_contacts extends rcube_addressbook
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$acl = $this->storagefolder->getACL();
|
$acl = $this->storagefolder->getACL();
|
||||||
$acl = $acl[$_SESSION['username']];
|
if (is_array($acl)) {
|
||||||
if (strpos($acl, 'i') !== false)
|
$acl = $acl[$_SESSION['username']];
|
||||||
$this->readonly = false;
|
if (strpos($acl, 'i') !== false)
|
||||||
if (strpos($acl, 'a') !== false || strpos($acl, 'x') !== false)
|
$this->readonly = false;
|
||||||
$this->editable = true;
|
if (strpos($acl, 'a') !== false || strpos($acl, 'x') !== false)
|
||||||
|
$this->editable = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue