diff options
Diffstat (limited to 'actions/plugins/settings')
-rw-r--r-- | actions/plugins/settings/save.php | 12 |
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 |