aboutsummaryrefslogtreecommitdiff
path: root/actions/plugins/settings
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/plugins/settings
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/plugins/settings')
-rw-r--r--actions/plugins/settings/save.php12
1 files changed, 6 insertions, 6 deletions
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