mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-14 00:24:40 +00:00
src: show save message in correct language after language switch
get_std_save_message() should be removed eventually, there are only a few callers left. Out of lack of imagintion, just fix the apparent issue and remove the attached filter/firewall message that doesn't really work because it does not look for "firewall" in the script name.
This commit is contained in:
parent
2c8c466642
commit
32f2ddbcf4
@ -261,20 +261,13 @@ function print_service_banner($service)
|
||||
}
|
||||
}
|
||||
|
||||
function get_std_save_message()
|
||||
function get_std_save_message($raw = false)
|
||||
{
|
||||
$filter_related = false;
|
||||
$filter_pages = array("nat", "filter");
|
||||
$to_return = gettext("The changes have been applied successfully.");
|
||||
foreach($filter_pages as $fp) {
|
||||
if (stristr($_SERVER['SCRIPT_FILENAME'], $fp)) {
|
||||
$filter_related = true;
|
||||
}
|
||||
if ($raw == true) {
|
||||
return 'The changes have been applied successfully.';
|
||||
}
|
||||
if ($filter_related) {
|
||||
$to_return .= "<br />" . gettext("You can also <a href=\"status_filter_reload.php\">monitor</a> the filter reload progress.");
|
||||
}
|
||||
return $to_return;
|
||||
|
||||
return gettext('The changes have been applied successfully.');
|
||||
}
|
||||
|
||||
function get_specialnets($only_enabled=false)
|
||||
|
||||
@ -37,7 +37,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
|
||||
$pconfig = array();
|
||||
|
||||
if (isset($_GET['savemsg'])) {
|
||||
$savemsg = htmlspecialchars($_GET['savemsg']);
|
||||
$savemsg = htmlspecialchars(gettext($_GET['savemsg']));
|
||||
}
|
||||
|
||||
$pconfig['dns1gw'] = null;
|
||||
@ -229,7 +229,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
|
||||
system_timezone_configure();
|
||||
filter_configure();
|
||||
|
||||
header(url_safe('Location: /system_general.php?savemsg=%s', array(get_std_save_message())));
|
||||
header(url_safe('Location: /system_general.php?savemsg=%s', array(get_std_save_message(true))));
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user