From 3423daa3784995f25b72ebfb1e17d59f745f9354 Mon Sep 17 00:00:00 2001 From: ewinslow Date: Tue, 2 Nov 2010 18:20:13 +0000 Subject: Using REFERER shorthand throughout core git-svn-id: http://code.elgg.org/elgg/trunk@7193 36083f99-b078-4883-b0ff-0f9b5a30f544 --- actions/comments/add.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'actions/comments/add.php') 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); -- cgit v1.2.3