From 7ddd9521b3f3a397da3b0a6b56238d31414eb4be Mon Sep 17 00:00:00 2001 From: brettp Date: Thu, 28 Oct 2010 19:17:36 +0000 Subject: Standardized code in all of core, not including language files, tests, or core mods. git-svn-id: http://code.elgg.org/elgg/trunk@7124 36083f99-b078-4883-b0ff-0f9b5a30f544 --- actions/comments/add.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'actions/comments/add.php') diff --git a/actions/comments/add.php b/actions/comments/add.php index 84467168a..2e28e7839 100644 --- a/actions/comments/add.php +++ b/actions/comments/add.php @@ -2,7 +2,8 @@ /** * Elgg add comment action * - * @package Elgg + * @package Elgg.Core + * @subpackage Comments */ // Make sure we're logged in; forward to the front page if not @@ -27,11 +28,11 @@ if (!$entity) { $user = get_loggedin_user(); -$annotation = create_annotation($entity->guid, +$annotation = create_annotation($entity->guid, 'generic_comment', - $comment_text, - "", - $user->guid, + $comment_text, + "", + $user->guid, $entity->access_id); // tell user annotation posted @@ -42,7 +43,7 @@ if (!$annotation) { // notify if poster wasn't owner if ($entity->owner_guid != $user->guid) { - + notify_user($entity->owner_guid, $user->guid, elgg_echo('generic_comment:email:subject'), @@ -59,8 +60,9 @@ if ($entity->owner_guid != $user->guid) { } system_message(elgg_echo("generic_comment:posted")); + //add to river -add_to_river('annotation/annotate','comment',$user->guid,$entity->guid, "", 0, $annotation); +add_to_river('annotation/annotate', 'comment', $user->guid, $entity->guid, "", 0, $annotation); // Forward to the page the action occurred on forward($_SERVER['HTTP_REFERER']); -- cgit v1.2.3