diff options
Diffstat (limited to 'actions')
31 files changed, 43 insertions, 43 deletions
diff --git a/actions/admin/menu_items.php b/actions/admin/menu_items.php index 8b01ae8fe..c9efb8bee 100644 --- a/actions/admin/menu_items.php +++ b/actions/admin/menu_items.php @@ -47,4 +47,4 @@ set_config('menu_items_custom_items', $custom_items); system_message(elgg_echo('admin:menu_items:saved')); -forward($_SERVER['HTTP_REFERER']); +forward(REFERER); diff --git a/actions/admin/plugins/disable.php b/actions/admin/plugins/disable.php index 5ad49d2c7..48116e43a 100644 --- a/actions/admin/plugins/disable.php +++ b/actions/admin/plugins/disable.php @@ -32,4 +32,4 @@ foreach ($plugin as $p) { elgg_invalidate_simplecache(); elgg_filepath_cache_reset(); -forward($_SERVER['HTTP_REFERER']); +forward(REFERER); diff --git a/actions/admin/plugins/disableall.php b/actions/admin/plugins/disableall.php index f2545fb0e..bd68c17b1 100644 --- a/actions/admin/plugins/disableall.php +++ b/actions/admin/plugins/disableall.php @@ -27,4 +27,4 @@ foreach ($plugins as $p => $data) { elgg_invalidate_simplecache(); elgg_filepath_cache_reset(); -forward($_SERVER['HTTP_REFERER']); +forward(REFERER); diff --git a/actions/admin/plugins/enable.php b/actions/admin/plugins/enable.php index 92ccd185b..b15666093 100644 --- a/actions/admin/plugins/enable.php +++ b/actions/admin/plugins/enable.php @@ -33,4 +33,4 @@ foreach ($plugin as $p) { elgg_invalidate_simplecache(); elgg_filepath_cache_reset(); -forward($_SERVER['HTTP_REFERER']);
\ No newline at end of file +forward(REFERER);
\ No newline at end of file diff --git a/actions/admin/plugins/enableall.php b/actions/admin/plugins/enableall.php index 5a85b6e07..b959c235f 100644 --- a/actions/admin/plugins/enableall.php +++ b/actions/admin/plugins/enableall.php @@ -27,4 +27,4 @@ foreach ($plugins as $p => $data) { elgg_invalidate_simplecache(); elgg_filepath_cache_reset(); -forward($_SERVER['HTTP_REFERER']);
\ No newline at end of file +forward(REFERER);
\ No newline at end of file diff --git a/actions/admin/plugins/reorder.php b/actions/admin/plugins/reorder.php index 165495050..e3c65f6e5 100644 --- a/actions/admin/plugins/reorder.php +++ b/actions/admin/plugins/reorder.php @@ -50,4 +50,4 @@ if (regenerate_plugin_list($plugins)) { elgg_invalidate_simplecache(); elgg_filepath_cache_reset(); -forward($_SERVER['HTTP_REFERER']);
\ No newline at end of file +forward(REFERER);
\ No newline at end of file diff --git a/actions/admin/plugins/simple_update_states.php b/actions/admin/plugins/simple_update_states.php index a81cb6a7a..7d01e4a46 100644 --- a/actions/admin/plugins/simple_update_states.php +++ b/actions/admin/plugins/simple_update_states.php @@ -50,4 +50,4 @@ if ($success) { elgg_invalidate_simplecache(); elgg_filepath_cache_reset(); -forward($_SERVER['HTTP_REFERER']);
\ No newline at end of file +forward(REFERER);
\ No newline at end of file diff --git a/actions/admin/site/update_advanced.php b/actions/admin/site/update_advanced.php index 10a186bd1..127fd38b6 100644 --- a/actions/admin/site/update_advanced.php +++ b/actions/admin/site/update_advanced.php @@ -82,5 +82,5 @@ if (datalist_get('default_site')) { register_error(elgg_echo("admin:configuration:fail")); } - forward($_SERVER['HTTP_REFERER']); + forward(REFERER); }
\ No newline at end of file diff --git a/actions/admin/site/update_basic.php b/actions/admin/site/update_basic.php index dd3e08301..94882cfd3 100644 --- a/actions/admin/site/update_basic.php +++ b/actions/admin/site/update_basic.php @@ -26,4 +26,4 @@ if (datalist_get('default_site')) { set_config('language', get_input('language'), $site->getGUID()); } -forward($_SERVER['HTTP_REFERER']);
\ No newline at end of file +forward(REFERER);
\ No newline at end of file diff --git a/actions/admin/user/makeadmin.php b/actions/admin/user/makeadmin.php index f8a426a41..19f365d62 100644 --- a/actions/admin/user/makeadmin.php +++ b/actions/admin/user/makeadmin.php @@ -26,4 +26,4 @@ if (($user instanceof ElggUser) && ($user->canEdit())) { register_error(elgg_echo('admin:user:makeadmin:no')); } -forward($_SERVER['HTTP_REFERER']); +forward(REFERER); diff --git a/actions/admin/user/removeadmin.php b/actions/admin/user/removeadmin.php index 9e8c55ac9..468670940 100644 --- a/actions/admin/user/removeadmin.php +++ b/actions/admin/user/removeadmin.php @@ -21,4 +21,4 @@ if (($user instanceof ElggUser) && ($user->canEdit())) { register_error(elgg_echo('admin:user:removeadmin:no')); } -forward($_SERVER['HTTP_REFERER']); +forward(REFERER); diff --git a/actions/admin/user/resetpassword.php b/actions/admin/user/resetpassword.php index c70410201..46a983c86 100644 --- a/actions/admin/user/resetpassword.php +++ b/actions/admin/user/resetpassword.php @@ -42,4 +42,4 @@ if (($obj instanceof ElggUser) && ($obj->canEdit())) { register_error(elgg_echo('admin:user:resetpassword:no')); } -forward($_SERVER['HTTP_REFERER']);
\ No newline at end of file +forward(REFERER);
\ No newline at end of file diff --git a/actions/admin/user/unban.php b/actions/admin/user/unban.php index 2bc609b5c..66173623a 100644 --- a/actions/admin/user/unban.php +++ b/actions/admin/user/unban.php @@ -26,4 +26,4 @@ if (($obj instanceof ElggUser) && ($obj->canEdit())) { access_show_hidden_entities($access_status); -forward($_SERVER['HTTP_REFERER']); +forward(REFERER); 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 diff --git a/actions/email/save.php b/actions/email/save.php index c84969945..0dee6ee1e 100644 --- a/actions/email/save.php +++ b/actions/email/save.php @@ -19,7 +19,7 @@ if (!$user_id) { if (!is_email_address($email)) { register_error(elgg_echo('email:save:fail')); - forward($_SERVER['HTTP_REFERER']); + forward(REFERER); } if ($user) { diff --git a/actions/entities/delete.php b/actions/entities/delete.php index 61913e2f8..3ec88bd04 100644 --- a/actions/entities/delete.php +++ b/actions/entities/delete.php @@ -21,4 +21,4 @@ if (($entity) && ($entity->canEdit())) { register_error(sprintf(elgg_echo('entity:delete:fail'), $guid)); } -forward($_SERVER['HTTP_REFERER']); +forward(REFERER); diff --git a/actions/friends/add.php b/actions/friends/add.php index d26539a54..60431a27d 100644 --- a/actions/friends/add.php +++ b/actions/friends/add.php @@ -31,4 +31,4 @@ if (!$errors) { } // Forward back to the page you friended the user on -forward($_SERVER['HTTP_REFERER']); +forward(REFERER); diff --git a/actions/friends/remove.php b/actions/friends/remove.php index f79fdf0ac..786b5975b 100644 --- a/actions/friends/remove.php +++ b/actions/friends/remove.php @@ -32,4 +32,4 @@ if (!$errors) { } // Forward back to the page you made the friend on -forward($_SERVER['HTTP_REFERER']); +forward(REFERER); diff --git a/actions/import/opendd.php b/actions/import/opendd.php index 96eb2bc05..0bf748734 100644 --- a/actions/import/opendd.php +++ b/actions/import/opendd.php @@ -24,4 +24,4 @@ if ($return) { register_error(elgg_echo('importfail')); } -forward($_SERVER['HTTP_REFERER']); +forward(REFERER); 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 diff --git a/actions/login.php b/actions/login.php index b7823514a..67a2052b6 100644 --- a/actions/login.php +++ b/actions/login.php @@ -36,7 +36,7 @@ if ($result) { forward($forward_url); } else { if (get_input('returntoreferer')) { - forward($_SERVER['HTTP_REFERER']); + forward(REFERER); } else { // forward to index for front page overrides. // index will forward to dashboard if appropriate. diff --git a/actions/plugins/settings/save.php b/actions/plugins/settings/save.php index 24af3f5fa..1a8b2db3d 100644 --- a/actions/plugins/settings/save.php +++ b/actions/plugins/settings/save.php @@ -10,7 +10,7 @@ $params = get_input('params'); $plugin = get_input('plugin'); if (!$plugin_info = load_plugin_manifest($plugin)) { register_error(sprintf(elgg_echo('plugins:settings:save:fail'), $plugin)); - forward($_SERVER['HTTP_REFERER']); + forward(REFERER); } $plugin_name = $plugin_info['name']; @@ -32,28 +32,28 @@ if (elgg_action_exist("settings/$plugin/save")) { foreach ($params as $k => $v) { if (!$result = set_plugin_setting($k, $v, $plugin)) { register_error(sprintf(elgg_echo('plugins:settings:save:fail'), $plugin_name)); - forward($_SERVER['HTTP_REFERER']); + forward(REFERER); exit; } } } system_message(sprintf(elgg_echo('plugins:settings:save:ok'), $plugin_name)); -forward($_SERVER['HTTP_REFERER']); +forward(REFERER); // //$trigger = trigger_plugin_hook('plugin:save_settings', $plugin, $options, NULL); //if ($trigger === NULL) { // foreach ($params as $k => $v) { // if (!$result = set_plugin_setting($k, $v, $plugin)) { // register_error(sprintf(elgg_echo('plugins:settings:save:fail'), $plugin_name)); -// forward($_SERVER['HTTP_REFERER']); +// forward(REFERER); // exit; // } // } //} elseif ($trigger === FALSE) { // register_error(sprintf(elgg_echo('plugins:settings:save:fail'), $plugin_name)); -// forward($_SERVER['HTTP_REFERER']); +// forward(REFERER); //} // //system_message(sprintf(elgg_echo('plugins:settings:save:ok'), $plugin_name)); -//forward($_SERVER['HTTP_REFERER']);
\ No newline at end of file +//forward(REFERER);
\ No newline at end of file diff --git a/actions/plugins/usersettings/save.php b/actions/plugins/usersettings/save.php index 3e7f48f52..27f549184 100644 --- a/actions/plugins/usersettings/save.php +++ b/actions/plugins/usersettings/save.php @@ -20,10 +20,10 @@ foreach ($params as $k => $v) { // Error? if (!$result) { register_error(sprintf(elgg_echo('plugins:usersettings:save:fail'), $plugin)); - forward($_SERVER['HTTP_REFERER']); + forward(REFERER); exit; } } system_message(sprintf(elgg_echo('plugins:usersettings:save:ok'), $plugin)); -forward($_SERVER['HTTP_REFERER']); +forward(REFERER); diff --git a/actions/user/name.php b/actions/user/name.php index acf83ab49..c3e79d725 100644 --- a/actions/user/name.php +++ b/actions/user/name.php @@ -19,7 +19,7 @@ if (!$user_id) { if (elgg_strlen($name) > 50) { register_error(elgg_echo('user:name:fail')); - forward($_SERVER['HTTP_REFERER']); + forward(REFERER); } if (($user) && ($user->canEdit()) && ($name)) { diff --git a/actions/useradd.php b/actions/useradd.php index 2b3dfe429..54def11b3 100644 --- a/actions/useradd.php +++ b/actions/useradd.php @@ -48,4 +48,4 @@ try { register_error($r->getMessage()); } -forward($_SERVER['HTTP_REFERER']); +forward(REFERER); diff --git a/actions/usersettings/save.php b/actions/usersettings/save.php index 5e375941f..3e0117f06 100644 --- a/actions/usersettings/save.php +++ b/actions/usersettings/save.php @@ -12,4 +12,4 @@ gatekeeper(); trigger_plugin_hook('usersettings:save', 'user'); -forward($_SERVER['HTTP_REFERER']); +forward(REFERER); diff --git a/actions/widgets/add.php b/actions/widgets/add.php index b38e53f0d..57c331e21 100644 --- a/actions/widgets/add.php +++ b/actions/widgets/add.php @@ -27,4 +27,4 @@ if ($result) { register_error(elgg_echo('widgets:save:failure')); } -forward($_SERVER['HTTP_REFERER']);
\ No newline at end of file +forward(REFERER);
\ No newline at end of file diff --git a/actions/widgets/reorder.php b/actions/widgets/reorder.php index c7c525a81..e43a0ba73 100644 --- a/actions/widgets/reorder.php +++ b/actions/widgets/reorder.php @@ -21,4 +21,4 @@ if ($result) { register_error(elgg_echo('widgets:panel:save:failure')); } -forward($_SERVER['HTTP_REFERER']);
\ No newline at end of file +forward(REFERER);
\ No newline at end of file diff --git a/actions/widgets/save.php b/actions/widgets/save.php index 673767939..945634d97 100644 --- a/actions/widgets/save.php +++ b/actions/widgets/save.php @@ -27,4 +27,4 @@ if ($result) { register_error(elgg_echo('widgets:save:failure')); } -forward($_SERVER['HTTP_REFERER']);
\ No newline at end of file +forward(REFERER);
\ No newline at end of file |