Commit 32f2ddbc authored by Franco Fichtner's avatar Franco Fichtner

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.
parent 2c8c4666
...@@ -261,20 +261,13 @@ function print_service_banner($service) ...@@ -261,20 +261,13 @@ function print_service_banner($service)
} }
} }
function get_std_save_message() function get_std_save_message($raw = false)
{ {
$filter_related = false; if ($raw == true) {
$filter_pages = array("nat", "filter"); return 'The changes have been applied successfully.';
$to_return = gettext("The changes have been applied successfully.");
foreach($filter_pages as $fp) {
if (stristr($_SERVER['SCRIPT_FILENAME'], $fp)) {
$filter_related = true;
}
}
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) function get_specialnets($only_enabled=false)
......
...@@ -37,7 +37,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { ...@@ -37,7 +37,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$pconfig = array(); $pconfig = array();
if (isset($_GET['savemsg'])) { if (isset($_GET['savemsg'])) {
$savemsg = htmlspecialchars($_GET['savemsg']); $savemsg = htmlspecialchars(gettext($_GET['savemsg']));
} }
$pconfig['dns1gw'] = null; $pconfig['dns1gw'] = null;
...@@ -229,7 +229,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { ...@@ -229,7 +229,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
system_timezone_configure(); system_timezone_configure();
filter_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; exit;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment