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.php8
1 files changed, 4 insertions, 4 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);