From 27009477e3f523721eacc784598a616bf438d772 Mon Sep 17 00:00:00 2001 From: marcus Date: Wed, 25 Jun 2008 14:17:27 +0000 Subject: Refs #78: Email notifications on friending, comments http://trac.elgg.org/elgg/ticket/78 git-svn-id: https://code.elgg.org/elgg/trunk@1124 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/notification.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'engine/lib/notification.php') diff --git a/engine/lib/notification.php b/engine/lib/notification.php index 6be6ae524..145f9a4a0 100644 --- a/engine/lib/notification.php +++ b/engine/lib/notification.php @@ -67,7 +67,7 @@ */ function notify_user($to, $from, $subject, $message, array $params = NULL, $methods_override = "") { - global $NOTIFICATION_HANDLERS; + global $NOTIFICATION_HANDLERS, $CONFIG; // Sanitise if (!is_array($to)) @@ -108,15 +108,19 @@ if ((!$NOTIFICATION_HANDLERS[$method]) || (!$handler)) throw new NotificationException(sprintf(elgg_echo('NotificationException:NoHandlerFound'), $method)); + + if ($CONFIG->debug) + error_log("Sending message to $guid using $method"); // Trigger handler and retrieve result. $result[$guid][$method] = $handler( $from ? get_entity($from) : NULL, // From entity get_entity($guid), // To entity $subject, // The subject - sanitise_string($message), // Message + $message, // Message $params // Params ); + } } -- cgit v1.2.3