diff options
Diffstat (limited to 'actions/comments')
-rw-r--r-- | actions/comments/add.php | 8 | ||||
-rw-r--r-- | actions/comments/delete.php | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/actions/comments/add.php b/actions/comments/add.php index 2e28e7839..b7feb4b66 100644 --- a/actions/comments/add.php +++ b/actions/comments/add.php @@ -16,14 +16,14 @@ $comment_text = get_input('generic_comment'); // make sure comment is not empty if (empty($comment_text)) { register_error(elgg_echo("generic_comment:blank")); - forward($_SERVER['HTTP_REFERER']); + forward(REFERER); } // Let's see if we can get an entity with the specified GUID $entity = get_entity($entity_guid); if (!$entity) { register_error(elgg_echo("generic_comment:notfound")); - forward($_SERVER['HTTP_REFERER']); + forward(REFERER); } $user = get_loggedin_user(); @@ -38,7 +38,7 @@ $annotation = create_annotation($entity->guid, // tell user annotation posted if (!$annotation) { register_error(elgg_echo("generic_comment:failure")); - forward($_SERVER['HTTP_REFERER']); + forward(REFERER); } // notify if poster wasn't owner @@ -65,4 +65,4 @@ system_message(elgg_echo("generic_comment:posted")); add_to_river('annotation/annotate', 'comment', $user->guid, $entity->guid, "", 0, $annotation); // Forward to the page the action occurred on -forward($_SERVER['HTTP_REFERER']); +forward(REFERER); diff --git a/actions/comments/delete.php b/actions/comments/delete.php index 47c988d51..d0f5c7b84 100644 --- a/actions/comments/delete.php +++ b/actions/comments/delete.php @@ -27,4 +27,4 @@ if ($comment = get_annotation($annotation_id)) { } register_error(elgg_echo("generic_comment:notdeleted")); -forward($_SERVER['HTTP_REFERER']);
\ No newline at end of file +forward(REFERER);
\ No newline at end of file |