diff --git a/calendar/inc/class.calendar_boupdate.inc.php b/calendar/inc/class.calendar_boupdate.inc.php index 2cc66b61e4..c8e8edff60 100644 --- a/calendar/inc/class.calendar_boupdate.inc.php +++ b/calendar/inc/class.calendar_boupdate.inc.php @@ -819,6 +819,22 @@ class calendar_boupdate extends calendar_bo * @return bool true/false */ function send_update($msg_type, $to_notify, $old_event, $new_event=null, $user=0, array $alarm=null) + { + Api\Egw::on_shutdown([$this, '_send_update'], func_get_args()); + } + + /** + * sends update-messages to certain participants of an event + * + * @param int $msg_type type of the notification: MSG_ADDED, MSG_MODIFIED, MSG_ACCEPTED, ... + * @param array $to_notify numerical user-ids as keys (!) (value is not used) + * @param array $old_event Event before the change + * @param array $new_event =null Event after the change + * @param int|string $user =0 User/participant who started the notify, default current user + * @param array $alarm =null values for "offset", "start", etc. + * @return bool true/false + */ + function _send_update($msg_type, $to_notify, $old_event, $new_event=null, $user=0, array $alarm=null) { //error_log(__METHOD__."($msg_type,".array2string($to_notify).",...) ".array2string($new_event)); if (!is_array($to_notify)) diff --git a/json.php b/json.php index eea1785473..c1303dfe07 100644 --- a/json.php +++ b/json.php @@ -129,7 +129,7 @@ try { $json->parseRequest($_GET['menuaction'], $_REQUEST['json_data']); } Json\Response::get(); - exit(); + $GLOBALS['egw']->__destruct(); } // missing menuaction GET parameter or request:parameters object or unparsable JSON catch (\InvalidArgumentException $e) {