Log errors if some libkolab modules are missing
This commit is contained in:
parent
57f1d89fcc
commit
ace437f1da
2 changed files with 26 additions and 1 deletions
|
@ -52,7 +52,20 @@ class kolab_format_event extends kolab_format_xcal
|
|||
*/
|
||||
public function to_libcal()
|
||||
{
|
||||
return class_exists('kolabcalendaring') ? new EventCal($this->obj) : false;
|
||||
static $error_logged = false;
|
||||
|
||||
if (class_exists('kolabcalendaring')) {
|
||||
return new EventCal($this->obj);
|
||||
}
|
||||
else if (!$error_logged) {
|
||||
$error_logged = true;
|
||||
rcube::raise_error(array(
|
||||
'code' => 900, 'type' => 'php',
|
||||
'message' => "required kolabcalendaring module not found"
|
||||
), true);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -63,6 +63,18 @@ class kolab_storage
|
|||
));
|
||||
self::$imap->set_pagesize(9999);
|
||||
}
|
||||
else if (!class_exists('kolabformat')) {
|
||||
rcube::raise_error(array(
|
||||
'code' => 900, 'type' => 'php',
|
||||
'message' => "required kolabformat module not found"
|
||||
), true);
|
||||
}
|
||||
else {
|
||||
rcube::raise_error(array(
|
||||
'code' => 900, 'type' => 'php',
|
||||
'message' => "IMAP server doesn't support METADATA or ANNOTATEMORE"
|
||||
), true);
|
||||
}
|
||||
|
||||
return self::$ready;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue