From 5f0a31826df97e2e3f3175e29644ec078abc6f6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cornelius=20Wei=C3=9F?= Date: Wed, 27 Sep 2006 10:03:34 +0000 Subject: [PATCH] php4 temporary workaround for notifications for 1.4 release --- calendar/inc/class.bocalupdate.inc.php | 11 ++--------- calendar/inc/class.php5_notification.inc.php | 11 +++++++++++ 2 files changed, 13 insertions(+), 9 deletions(-) create mode 100644 calendar/inc/class.php5_notification.inc.php diff --git a/calendar/inc/class.bocalupdate.inc.php b/calendar/inc/class.bocalupdate.inc.php index 4e992b7d1a..53748e5e6b 100644 --- a/calendar/inc/class.bocalupdate.inc.php +++ b/calendar/inc/class.bocalupdate.inc.php @@ -599,15 +599,8 @@ class bocalupdate extends bocal // notification via notification app. if (version_compare("5.1.0", phpversion()) && array_key_exists('notifications',$GLOBALS['egw_info']['apps'])) { - $notification = new notification(); - $notification->set_message($body); - $notification->set_receivers(array($userid)); - try { - $notification->send(); - } - catch(Exception $exception) { - error_log($exception->getMessage()); - } + require_once(EGW_INCLUDE_ROOT. '/notifications/inc/class.notification.inc.php'); + include(EGW_INCLUDE_ROOT. '/calendar/inc/class.php5_notification.inc.php'); } } diff --git a/calendar/inc/class.php5_notification.inc.php b/calendar/inc/class.php5_notification.inc.php new file mode 100644 index 0000000000..38ff809df9 --- /dev/null +++ b/calendar/inc/class.php5_notification.inc.php @@ -0,0 +1,11 @@ +set_message($body); +$notification->set_receivers(array($userid)); +try { + $notification->send(); +} +catch(Exception $exception) { + error_log($exception->getMessage()); +} +?>