From f1ba6ec14130a5480653745b22de6a001112bddb Mon Sep 17 00:00:00 2001 From: dave Date: Mon, 21 Sep 2009 14:50:23 +0000 Subject: New river code added to allow user comment to be pulled out and displayed git-svn-id: http://code.elgg.org/elgg/trunk@3490 36083f99-b078-4883-b0ff-0f9b5a30f544 --- actions/comments/add.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'actions') 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 { -- cgit v1.2.3