mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-04 20:40:14 +01:00
make calendar aware of possibly missing notification app. if notification app is missing, print an error to php log.
This commit is contained in:
parent
510d1e786e
commit
895dfe26c6
@ -594,20 +594,24 @@ class bocalupdate extends bocal
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// send via notification_app
|
// send via notification_app
|
||||||
require_once(EGW_INCLUDE_ROOT. '/notifications/inc/class.notification.inc.php');
|
if($GLOBALS['egw_info']['apps']['notifications']['enabled']) {
|
||||||
try {
|
require_once(EGW_INCLUDE_ROOT. '/notifications/inc/class.notification.inc.php');
|
||||||
$notification = new notification();
|
try {
|
||||||
$notification->set_receivers(array($userid));
|
$notification = new notification();
|
||||||
$notification->set_message($body);
|
$notification->set_receivers(array($userid));
|
||||||
$notification->set_sender($senderid);
|
$notification->set_message($body);
|
||||||
$notification->set_subject($subject);
|
$notification->set_sender($senderid);
|
||||||
$notification->set_links(array($details['link_arr']));
|
$notification->set_subject($subject);
|
||||||
if(is_array($attachment)) { $notification->set_attachments(array($attachment)); }
|
$notification->set_links(array($details['link_arr']));
|
||||||
$notification->send();
|
if(is_array($attachment)) { $notification->set_attachments(array($attachment)); }
|
||||||
}
|
$notification->send();
|
||||||
catch (Exception $exception) {
|
}
|
||||||
error_log('error while notifying user '.$userid.':'.$exception->getMessage());
|
catch (Exception $exception) {
|
||||||
continue;
|
error_log('error while notifying user '.$userid.':'.$exception->getMessage());
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
error_log('calendar: cannot send any notifications because notification-app is not installed');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user