From 5b3e80ec1722a083d35c20f60ed043951ebd4149 Mon Sep 17 00:00:00 2001 From: ben Date: Tue, 8 Jul 2008 12:28:11 +0000 Subject: Introducing notifications on generic comments. git-svn-id: https://code.elgg.org/elgg/trunk@1336 36083f99-b078-4883-b0ff-0f9b5a30f544 --- actions/comments/add.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'actions/comments/add.php') diff --git a/actions/comments/add.php b/actions/comments/add.php index 4f3d5eee8..d89fd7866 100644 --- a/actions/comments/add.php +++ b/actions/comments/add.php @@ -23,6 +23,19 @@ // If posting the comment was successful, say so if ($entity->annotate('generic_comment',$comment_text,$entity->access_id, $_SESSION['guid'])) { + if ($entity->owner_guid != $_SESSION['user']->getGUID()) + notify_user($entity->owner_guid, $_SESSION['user']->getGUID(), elgg_echo('generic_comment:email:subject'), + sprintf( + elgg_echo('generic_comment:email:body'), + $entity->title, + $_SESSION['user']->name, + $comment_text, + $entity->getURL(), + $_SESSION['user']->name, + $_SESSION['user']->getURL() + ) + ); + system_message(elgg_echo("generic_comment:posted")); } else { -- cgit v1.2.3