aboutsummaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
Diffstat (limited to 'actions')
-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 {