aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/notification.php
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-06-25 14:17:27 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-06-25 14:17:27 +0000
commit27009477e3f523721eacc784598a616bf438d772 (patch)
treed857ec16fed2d8f4eaff3915e4b5fa7e3812731f /engine/lib/notification.php
parent98b32177eb900e779fd2c7976b1e77fb9dd77d63 (diff)
downloadelgg-27009477e3f523721eacc784598a616bf438d772.tar.gz
elgg-27009477e3f523721eacc784598a616bf438d772.tar.bz2
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
Diffstat (limited to 'engine/lib/notification.php')
-rw-r--r--engine/lib/notification.php8
1 files changed, 6 insertions, 2 deletions
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
);
+
}
}