aboutsummaryrefslogtreecommitdiff
path: root/actions/comments/add.php
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-07-08 12:28:11 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-07-08 12:28:11 +0000
commit5b3e80ec1722a083d35c20f60ed043951ebd4149 (patch)
tree8e728b21d1f2a0f9c7cb573e56b8089dcd627cad /actions/comments/add.php
parent08cb7d2a6c8256ff7963c90c9ba0d92b46a3e3b3 (diff)
downloadelgg-5b3e80ec1722a083d35c20f60ed043951ebd4149.tar.gz
elgg-5b3e80ec1722a083d35c20f60ed043951ebd4149.tar.bz2
Introducing notifications on generic comments.
git-svn-id: https://code.elgg.org/elgg/trunk@1336 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'actions/comments/add.php')
-rw-r--r--actions/comments/add.php13
1 files changed, 13 insertions, 0 deletions
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 {