diff options
author | doktornotor <notordoktor@gmail.com> | 2017-03-21 17:34:12 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-21 17:34:12 +0100 |
commit | c90dcce1aa456575a9028bcef3478af89b1a9ca3 (patch) | |
tree | ff7ab82c846d86095fb0e9319b84c68c84ec178f /src/usr | |
parent | 2bee7c0220ffc95763229f4df179eefdd0d1bc13 (diff) | |
download | pfsense-c90dcce1aa456575a9028bcef3478af89b1a9ca3.zip pfsense-c90dcce1aa456575a9028bcef3478af89b1a9ca3.tar.gz |
Add reason to write_config() calls
Diffstat (limited to 'src/usr')
-rw-r--r-- | src/usr/local/www/firewall_nat_npt.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/usr/local/www/firewall_nat_npt.php b/src/usr/local/www/firewall_nat_npt.php index a12fe40..503b8c5 100644 --- a/src/usr/local/www/firewall_nat_npt.php +++ b/src/usr/local/www/firewall_nat_npt.php @@ -54,7 +54,7 @@ if (array_key_exists('order-store', $_REQUEST)) { $a_npt = $a_npt_new; - if (write_config()) { + if (write_config(gettext("Firewall: NAT: NPt - reordered NPt mappings."))) { mark_subsystem_dirty('natconf'); } @@ -76,7 +76,7 @@ if ($_POST['apply']) { if ($_POST['act'] == "del") { if ($a_npt[$_POST['id']]) { unset($a_npt[$_POST['id']]); - if (write_config()) { + if (write_config(gettext("Firewall: NAT: NPt - deleted NPt mapping."))) { mark_subsystem_dirty('natconf'); } header("Location: firewall_nat_npt.php"); @@ -91,7 +91,7 @@ if (isset($_POST['del_x'])) { unset($a_npt[$rulei]); } - if (write_config()) { + if (write_config(gettext("Firewall: NAT: NPt - deleted selected NPt mappings."))) { mark_subsystem_dirty('natconf'); } @@ -103,10 +103,12 @@ if (isset($_POST['del_x'])) { if ($a_npt[$_POST['id']]) { if (isset($a_npt[$_POST['id']]['disabled'])) { unset($a_npt[$_POST['id']]['disabled']); + $wc_msg = gettext('Firewall: NAT: NPt - enabled NPt rule.'); } else { $a_npt[$_POST['id']]['disabled'] = true; + $wc_msg = gettext('Firewall: NAT: NPt - disabled NPt rule.'); } - if (write_config(gettext("Firewall: NAT: NPt, enable/disable NAT rule"))) { + if (write_config($wc_msg)) { mark_subsystem_dirty('natconf'); } header("Location: firewall_nat_npt.php"); |