aboutsummaryrefslogtreecommitdiff
path: root/actions/comments/add.php
diff options
context:
space:
mode:
Diffstat (limited to 'actions/comments/add.php')
-rw-r--r--actions/comments/add.php16
1 files changed, 9 insertions, 7 deletions
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']);