aboutsummaryrefslogtreecommitdiff
path: root/mod/profile
diff options
context:
space:
mode:
Diffstat (limited to 'mod/profile')
-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
8 files changed, 12 insertions, 12 deletions
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