aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
Diffstat (limited to 'mod')
-rw-r--r--mod/blog/actions/blog/delete.php2
-rw-r--r--mod/blog/start.php2
-rw-r--r--mod/bookmarks/actions/delete.php2
-rw-r--r--mod/categories/actions/save.php2
-rw-r--r--mod/ecml/actions/save_permissions.php2
-rw-r--r--mod/file/actions/upload.php6
-rw-r--r--mod/groups/actions/addtogroup.php2
-rw-r--r--mod/groups/actions/edit.php4
-rw-r--r--mod/groups/actions/featured.php2
-rw-r--r--mod/groups/actions/groupskillinvitation.php2
-rw-r--r--mod/groups/actions/groupskillrequest.php2
-rw-r--r--mod/groups/actions/invite.php2
-rw-r--r--mod/groups/actions/join.php2
-rw-r--r--mod/groups/actions/joinrequest.php2
-rw-r--r--mod/groups/actions/leave.php2
-rw-r--r--mod/invitefriends/actions/invite.php4
-rw-r--r--mod/messages/actions/delete.php2
-rw-r--r--mod/notifications/actions/groupsave.php2
-rw-r--r--mod/notifications/actions/save.php2
-rw-r--r--mod/pages/actions/pages/delete.php2
-rw-r--r--mod/pages/actions/pages/edit.php2
-rw-r--r--mod/profile/actions/addcomment.php2
-rw-r--r--mod/profile/actions/cropicon.php2
-rw-r--r--mod/profile/actions/deletecomment.php4
-rw-r--r--mod/profile/actions/deletedefaultprofileitem.php2
-rw-r--r--mod/profile/actions/edit.php4
-rw-r--r--mod/profile/actions/editdefault.php2
-rw-r--r--mod/profile/actions/iconupload.php6
-rw-r--r--mod/profile/actions/resetdefaultprofile.php2
-rw-r--r--mod/sitepages/actions/edit_settings.php4
30 files changed, 39 insertions, 39 deletions
diff --git a/mod/blog/actions/blog/delete.php b/mod/blog/actions/blog/delete.php
index c2cd5278f..d338fd2df 100644
--- a/mod/blog/actions/blog/delete.php
+++ b/mod/blog/actions/blog/delete.php
@@ -20,4 +20,4 @@ if (elgg_instanceof($blog, 'object', 'blog') && $blog->canEdit()) {
register_error(elgg_echo('blog:error:post_not_found'));
}
-forward($_SERVER['HTTP_REFERER']); \ No newline at end of file
+forward(REFERER); \ No newline at end of file
diff --git a/mod/blog/start.php b/mod/blog/start.php
index a87a14ca2..208f3b969 100644
--- a/mod/blog/start.php
+++ b/mod/blog/start.php
@@ -102,7 +102,7 @@ function blog_page_handler($page) {
// forward away if invalid user.
if (!$user = get_user_by_username($username)) {
register_error('blog:error:unknown_username');
- forward($_SERVER['HTTP_REFERER']);
+ forward(REFERER);
}
set_page_owner($user->getGUID());
diff --git a/mod/bookmarks/actions/delete.php b/mod/bookmarks/actions/delete.php
index d6e19cdae..23de80146 100644
--- a/mod/bookmarks/actions/delete.php
+++ b/mod/bookmarks/actions/delete.php
@@ -17,4 +17,4 @@ if ($entity = get_entity($guid)) {
}
register_error(elgg_echo("bookmarks:delete:failed"));
-forward($_SERVER['HTTP_REFERER']); \ No newline at end of file
+forward(REFERER); \ No newline at end of file
diff --git a/mod/categories/actions/save.php b/mod/categories/actions/save.php
index 48f050c14..dc2c7943b 100644
--- a/mod/categories/actions/save.php
+++ b/mod/categories/actions/save.php
@@ -14,4 +14,4 @@ system_message(elgg_echo("categories:save:success"));
elgg_delete_admin_notice('categories_admin_notice_no_categories');
-forward($_SERVER['HTTP_REFERER']); \ No newline at end of file
+forward(REFERER); \ No newline at end of file
diff --git a/mod/ecml/actions/save_permissions.php b/mod/ecml/actions/save_permissions.php
index 89b2179fa..f32544d86 100644
--- a/mod/ecml/actions/save_permissions.php
+++ b/mod/ecml/actions/save_permissions.php
@@ -34,4 +34,4 @@ if (set_plugin_setting('ecml_permissions', serialize($perms), 'ecml')) {
register_error(elgg_echo('ecml:admin:cannot_save_permissions'));
}
-forward($_SERVER['HTTP_REFERER']);
+forward(REFERER);
diff --git a/mod/file/actions/upload.php b/mod/file/actions/upload.php
index 82744730c..6af52c701 100644
--- a/mod/file/actions/upload.php
+++ b/mod/file/actions/upload.php
@@ -47,7 +47,7 @@
exit;
} else {
register_error($error);
- forward($_SERVER['HTTP_REFERER']);
+ forward(REFERER);
}
}
@@ -64,13 +64,13 @@
$file = get_entity($guid);
if (!$file) {
register_error(elgg_echo('file:cannotload'));
- forward($_SERVER['HTTP_REFERER']);
+ forward(REFERER);
}
// user must be able to edit file
if (!$file->canEdit()) {
register_error(elgg_echo('file:noaccess'));
- forward($_SERVER['HTTP_REFERER']);
+ forward(REFERER);
}
}
diff --git a/mod/groups/actions/addtogroup.php b/mod/groups/actions/addtogroup.php
index ff2ab6944..6f63ff446 100644
--- a/mod/groups/actions/addtogroup.php
+++ b/mod/groups/actions/addtogroup.php
@@ -89,6 +89,6 @@
}
}
- forward($_SERVER['HTTP_REFERER']);
+ forward(REFERER);
?>
diff --git a/mod/groups/actions/edit.php b/mod/groups/actions/edit.php
index 6e738e205..4ae98815c 100644
--- a/mod/groups/actions/edit.php
+++ b/mod/groups/actions/edit.php
@@ -31,7 +31,7 @@ $group = new ElggGroup($group_guid); // load if present, if not create a new gro
if (($group_guid) && (!$group->canEdit())) {
register_error(elgg_echo("groups:cantedit"));
- forward($_SERVER['HTTP_REFERER']);
+ forward(REFERER);
exit;
}
@@ -46,7 +46,7 @@ if (sizeof($input) > 0) {
if (!$group->name) {
register_error(elgg_echo("groups:notitle"));
- forward($_SERVER['HTTP_REFERER']);
+ forward(REFERER);
exit;
}
diff --git a/mod/groups/actions/featured.php b/mod/groups/actions/featured.php
index 8dc9dcc65..b49a76471 100644
--- a/mod/groups/actions/featured.php
+++ b/mod/groups/actions/featured.php
@@ -35,4 +35,4 @@
}
- forward($_SERVER['HTTP_REFERER']); \ No newline at end of file
+ forward(REFERER); \ No newline at end of file
diff --git a/mod/groups/actions/groupskillinvitation.php b/mod/groups/actions/groupskillinvitation.php
index ea74024fc..46d71bede 100644
--- a/mod/groups/actions/groupskillinvitation.php
+++ b/mod/groups/actions/groupskillinvitation.php
@@ -23,6 +23,6 @@
system_message(elgg_echo("groups:invitekilled"));
}
- forward($_SERVER['HTTP_REFERER']);
+ forward(REFERER);
?> \ No newline at end of file
diff --git a/mod/groups/actions/groupskillrequest.php b/mod/groups/actions/groupskillrequest.php
index 153dc0179..c0511cc0e 100644
--- a/mod/groups/actions/groupskillrequest.php
+++ b/mod/groups/actions/groupskillrequest.php
@@ -23,6 +23,6 @@
system_message(elgg_echo("groups:joinrequestkilled"));
}
- forward($_SERVER['HTTP_REFERER']);
+ forward(REFERER);
?> \ No newline at end of file
diff --git a/mod/groups/actions/invite.php b/mod/groups/actions/invite.php
index fa56b9015..9ab4f2440 100644
--- a/mod/groups/actions/invite.php
+++ b/mod/groups/actions/invite.php
@@ -60,6 +60,6 @@ if (sizeof($user_guid))
}
}
-forward($_SERVER['HTTP_REFERER']);
+forward(REFERER);
?>
diff --git a/mod/groups/actions/join.php b/mod/groups/actions/join.php
index 6fd94d34a..158da372c 100644
--- a/mod/groups/actions/join.php
+++ b/mod/groups/actions/join.php
@@ -58,6 +58,6 @@
else
register_error(elgg_echo("groups:cantjoin"));
- forward($_SERVER['HTTP_REFERER']);
+ forward(REFERER);
exit;
?>
diff --git a/mod/groups/actions/joinrequest.php b/mod/groups/actions/joinrequest.php
index fae8fc0de..a3b372e65 100644
--- a/mod/groups/actions/joinrequest.php
+++ b/mod/groups/actions/joinrequest.php
@@ -79,4 +79,4 @@ if (($group) && ($user) && (!$group->isMember($user)))
}
}
-forward($_SERVER['HTTP_REFERER']); \ No newline at end of file
+forward(REFERER); \ No newline at end of file
diff --git a/mod/groups/actions/leave.php b/mod/groups/actions/leave.php
index 220a106cf..5ed2bf648 100644
--- a/mod/groups/actions/leave.php
+++ b/mod/groups/actions/leave.php
@@ -36,6 +36,6 @@
else
register_error(elgg_echo("groups:cantleave"));
- forward($_SERVER['HTTP_REFERER']);
+ forward(REFERER);
exit;
?> \ No newline at end of file
diff --git a/mod/invitefriends/actions/invite.php b/mod/invitefriends/actions/invite.php
index fa95ec23d..bb6b71385 100644
--- a/mod/invitefriends/actions/invite.php
+++ b/mod/invitefriends/actions/invite.php
@@ -16,7 +16,7 @@ if (strlen($emails) > 0) {
if (!is_array($emails) || count($emails) == 0) {
register_error(elgg_echo('invitefriends:noemails'));
- forward($_SERVER['HTTP_REFERER']);
+ forward(REFERER);
}
$current_user = get_loggedin_user();
@@ -82,4 +82,4 @@ if ($error) {
system_message(elgg_echo('invitefriends:success'));
}
-forward($_SERVER['HTTP_REFERER']);
+forward(REFERER);
diff --git a/mod/messages/actions/delete.php b/mod/messages/actions/delete.php
index 0f5bb2813..d59aff025 100644
--- a/mod/messages/actions/delete.php
+++ b/mod/messages/actions/delete.php
@@ -61,5 +61,5 @@ if ($success) {
}
} else {
register_error(elgg_echo("messages:notfound"));
- forward($_SERVER['HTTP_REFERER']);
+ forward(REFERER);
} \ No newline at end of file
diff --git a/mod/notifications/actions/groupsave.php b/mod/notifications/actions/groupsave.php
index 587b1117c..f39beb665 100644
--- a/mod/notifications/actions/groupsave.php
+++ b/mod/notifications/actions/groupsave.php
@@ -34,4 +34,4 @@ foreach($NOTIFICATION_HANDLERS as $method => $foo) {
system_message(elgg_echo('notifications:subscriptions:success'));
-forward($_SERVER['HTTP_REFERER']);
+forward(REFERER);
diff --git a/mod/notifications/actions/save.php b/mod/notifications/actions/save.php
index 18f243254..eddda9dc6 100644
--- a/mod/notifications/actions/save.php
+++ b/mod/notifications/actions/save.php
@@ -31,4 +31,4 @@ foreach($subscriptions as $key => $subscription) {
system_message(elgg_echo('notifications:subscriptions:success'));
-forward($_SERVER['HTTP_REFERER']);
+forward(REFERER);
diff --git a/mod/pages/actions/pages/delete.php b/mod/pages/actions/pages/delete.php
index ab28e23b6..8bc20b821 100644
--- a/mod/pages/actions/pages/delete.php
+++ b/mod/pages/actions/pages/delete.php
@@ -35,4 +35,4 @@ if ($page = get_entity($page)) {
}
register_error(elgg_echo('pages:delete:failure'));
-forward($_SERVER['HTTP_REFERER']);
+forward(REFERER);
diff --git a/mod/pages/actions/pages/edit.php b/mod/pages/actions/pages/edit.php
index db308b5d7..c8b151a97 100644
--- a/mod/pages/actions/pages/edit.php
+++ b/mod/pages/actions/pages/edit.php
@@ -71,7 +71,7 @@ if ($page instanceof ElggObject) {
if (!$page->title) {
register_error(elgg_echo("pages:notitle"));
- forward($_SERVER['HTTP_REFERER']);
+ forward(REFERER);
}
$page->access_id = (int)get_input('access_id', ACCESS_PRIVATE);
diff --git a/mod/profile/actions/addcomment.php b/mod/profile/actions/addcomment.php
index 86d3cbd47..5817b8e83 100644
--- a/mod/profile/actions/addcomment.php
+++ b/mod/profile/actions/addcomment.php
@@ -45,4 +45,4 @@ if ($user && !empty($message_content)) {
}
// Forward back to the messageboard
-forward($_SERVER['HTTP_REFERER']); \ No newline at end of file
+forward(REFERER); \ No newline at end of file
diff --git a/mod/profile/actions/cropicon.php b/mod/profile/actions/cropicon.php
index 21280463e..1212e8bab 100644
--- a/mod/profile/actions/cropicon.php
+++ b/mod/profile/actions/cropicon.php
@@ -12,7 +12,7 @@ $profile_owner = get_user_by_username($profile_username);
if (!$profile_owner || !($profile_owner instanceof ElggUser) || !$profile_owner->canEdit()) {
register_error(elgg_echo('profile:icon:fail'));
- forward($_SERVER['HTTP_REFERER']);
+ forward(REFERER);
}
$x1 = (int) get_input('x_1',0);
diff --git a/mod/profile/actions/deletecomment.php b/mod/profile/actions/deletecomment.php
index 0a104eabe..233d53069 100644
--- a/mod/profile/actions/deletecomment.php
+++ b/mod/profile/actions/deletecomment.php
@@ -19,11 +19,11 @@ if ($message = get_annotation($annotation_id)) {
$message->delete();
//display message
system_message(elgg_echo("profile:commentwall:deleted"));
- forward($_SERVER['HTTP_REFERER']);
+ forward(REFERER);
}
} else {
system_message(elgg_echo("profile:commentwall:notdeleted"));
}
-forward($_SERVER['HTTP_REFERER']); \ No newline at end of file
+forward(REFERER); \ No newline at end of file
diff --git a/mod/profile/actions/deletedefaultprofileitem.php b/mod/profile/actions/deletedefaultprofileitem.php
index a049cb8b0..f3880954f 100644
--- a/mod/profile/actions/deletedefaultprofileitem.php
+++ b/mod/profile/actions/deletedefaultprofileitem.php
@@ -28,4 +28,4 @@ if (($id) && (set_plugin_setting("admin_defined_profile_$id", '', 'profile')) &&
register_error(elgg_echo('profile:editdefault:delete:fail'));
}
-forward($_SERVER['HTTP_REFERER']); \ No newline at end of file
+forward(REFERER); \ No newline at end of file
diff --git a/mod/profile/actions/edit.php b/mod/profile/actions/edit.php
index b9cc8e19d..c91e5e5a7 100644
--- a/mod/profile/actions/edit.php
+++ b/mod/profile/actions/edit.php
@@ -13,7 +13,7 @@ $profile_owner = get_user_by_username($profile_username);
if (!$profile_owner || !$profile_owner->canEdit()) {
system_message(elgg_echo("profile:noaccess"));
- forward($_SERVER['HTTP_REFERER']);
+ forward(REFERER);
}
// grab the defined profile field names and their load the values from POST.
@@ -48,7 +48,7 @@ foreach($CONFIG->profile as $shortname => $valuetype) {
if (!is_array($value) && $valuetype != 'longtext' && elgg_strlen($value) > 250) {
$error = sprintf(elgg_echo('profile:field_too_long'), elgg_echo("profile:{$shortname}"));
register_error($error);
- forward($_SERVER['HTTP_REFERER']);
+ forward(REFERER);
}
if ($valuetype == 'tags') {
diff --git a/mod/profile/actions/editdefault.php b/mod/profile/actions/editdefault.php
index 6e4c3262b..1d50f432a 100644
--- a/mod/profile/actions/editdefault.php
+++ b/mod/profile/actions/editdefault.php
@@ -36,4 +36,4 @@ if (($label) && ($type)){
register_error(elgg_echo('profile:editdefault:fail'));
}
-forward($_SERVER['HTTP_REFERER']); \ No newline at end of file
+forward(REFERER); \ No newline at end of file
diff --git a/mod/profile/actions/iconupload.php b/mod/profile/actions/iconupload.php
index e780bde76..cd842752f 100644
--- a/mod/profile/actions/iconupload.php
+++ b/mod/profile/actions/iconupload.php
@@ -12,7 +12,7 @@ $profile_owner = get_user_by_username($profile_username);
if (!$profile_owner || !($profile_owner instanceof ElggUser) || !$profile_owner->canEdit()) {
register_error(elgg_echo('profile:icon:fail'));
- forward($_SERVER['HTTP_REFERER']);
+ forward(REFERER);
}
$profile_owner_guid = $profile_owner->getGUID();
@@ -49,7 +49,7 @@ foreach ($icon_sizes as $name => $size_info) {
}
system_message(elgg_echo('profile:icon:notfound'));
- forward($_SERVER['HTTP_REFERER']);
+ forward(REFERER);
}
}
@@ -61,4 +61,4 @@ if (trigger_elgg_event('profileiconupdate', $profile_owner->type, $profile_owner
}
//forward the user back to the upload page to crop
-forward($_SERVER['HTTP_REFERER']);
+forward(REFERER);
diff --git a/mod/profile/actions/resetdefaultprofile.php b/mod/profile/actions/resetdefaultprofile.php
index 26b596f90..facc82f71 100644
--- a/mod/profile/actions/resetdefaultprofile.php
+++ b/mod/profile/actions/resetdefaultprofile.php
@@ -20,4 +20,4 @@ set_plugin_setting('user_defined_fields', FALSE, 'profile');
system_message(elgg_echo('profile:defaultprofile:reset'));
-forward($_SERVER['HTTP_REFERER']); \ No newline at end of file
+forward(REFERER); \ No newline at end of file
diff --git a/mod/sitepages/actions/edit_settings.php b/mod/sitepages/actions/edit_settings.php
index d79c38240..8f328eb76 100644
--- a/mod/sitepages/actions/edit_settings.php
+++ b/mod/sitepages/actions/edit_settings.php
@@ -15,7 +15,7 @@ switch ($page_type) {
$content = get_input('sitepages_content', '', FALSE);
if (empty($content)) {
register_error(elgg_echo('sitepages:blank'));
- forward($_SERVER['HTTP_REFERER']);
+ forward(REFERER);
}
//$sitepage->title = $page_type;
@@ -47,4 +47,4 @@ if ($sitepage->save()) {
register_error(elgg_echo('sitepages:error'));
}
-forward($_SERVER['HTTP_REFERER']);
+forward(REFERER);