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/likes/add.php | 8 ++++---- actions/likes/delete.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'actions/likes') diff --git a/actions/likes/add.php b/actions/likes/add.php index b4b4a8462..211cb340b 100644 --- a/actions/likes/add.php +++ b/actions/likes/add.php @@ -12,13 +12,13 @@ $entity_guid = (int) get_input('guid'); //check to see if the user has already liked the item if (elgg_annotation_exists($entity_guid, 'likes')) { system_message(elgg_echo("likes:alreadyliked")); - 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("likes:notfound")); - forward($_SERVER['HTTP_REFERER']); + forward(REFERER); } $user = get_loggedin_user(); @@ -32,7 +32,7 @@ $annotation = create_annotation($entity->guid, // tell user annotation didn't work if that is the case if (!$annotation) { register_error(elgg_echo("likes:failure")); - forward($_SERVER['HTTP_REFERER']); + forward(REFERER); } // notify if poster wasn't owner @@ -59,4 +59,4 @@ system_message(elgg_echo("likes:likes")); add_to_river('annotation/annotatelike', 'likes', $user->guid, $entity->guid, "", 0, $annotation); // Forward back to the page where the user 'liked' the object -forward($_SERVER['HTTP_REFERER']); +forward(REFERER); diff --git a/actions/likes/delete.php b/actions/likes/delete.php index 3ca82308d..45984b581 100644 --- a/actions/likes/delete.php +++ b/actions/likes/delete.php @@ -28,4 +28,4 @@ if ($likes = get_annotation($annotation_id)) { } register_error(elgg_echo("likes:notdeleted")); -forward($_SERVER['HTTP_REFERER']); \ No newline at end of file +forward(REFERER); \ No newline at end of file -- cgit v1.2.3