aboutsummaryrefslogtreecommitdiff
path: root/actions/comments
diff options
context:
space:
mode:
Diffstat (limited to 'actions/comments')
-rw-r--r--actions/comments/add.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/actions/comments/add.php b/actions/comments/add.php
index 80478b9ad..0f0658837 100644
--- a/actions/comments/add.php
+++ b/actions/comments/add.php
@@ -22,8 +22,8 @@
if ($entity = get_entity($entity_guid)) {
// If posting the comment was successful, say so
- if ($entity->annotate('generic_comment',$comment_text,$entity->access_id, $_SESSION['guid'])) {
-
+ $annotation = create_annotation($entity->guid, 'generic_comment', $comment_text, "", $_SESSION['guid'], $entity->access_id);
+ if ($annotation) {
if ($entity->owner_guid != $_SESSION['user']->getGUID())
notify_user($entity->owner_guid, $_SESSION['user']->getGUID(), elgg_echo('generic_comment:email:subject'),
sprintf(
@@ -36,10 +36,9 @@
$_SESSION['user']->getURL()
)
);
-
system_message(elgg_echo("generic_comment:posted"));
//add to river
- add_to_river('annotation/annotate','comment',$_SESSION['user']->guid,$entity->guid);
+ add_to_river('annotation/annotate','comment',$_SESSION['user']->guid,$entity->guid, "", 0, $annotation);
} else {