aboutsummaryrefslogtreecommitdiff
path: root/actions/comments
diff options
context:
space:
mode:
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-02 18:20:13 +0000
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-02 18:20:13 +0000
commit3423daa3784995f25b72ebfb1e17d59f745f9354 (patch)
tree67c91d9979825a40906b432dad40afe860458930 /actions/comments
parent9e4472a987fb626b370f36377f761bde5ba32bdd (diff)
downloadelgg-3423daa3784995f25b72ebfb1e17d59f745f9354.tar.gz
elgg-3423daa3784995f25b72ebfb1e17d59f745f9354.tar.bz2
Using REFERER shorthand throughout core
git-svn-id: http://code.elgg.org/elgg/trunk@7193 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'actions/comments')
-rw-r--r--actions/comments/add.php8
-rw-r--r--actions/comments/delete.php2
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