diff options
author | jim-p <jimp@pfsense.org> | 2012-10-09 15:07:06 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2012-10-09 15:17:00 -0400 |
commit | 3a343d7384fbf78f987e8c4c2d9f307d22c8a072 (patch) | |
tree | 4b07c4c6d174a70520ec4ca578ecfe3e94048589 /usr/local/www/firewall_nat_out.php | |
parent | c9ba2f8a92b0e18b891af2049436d4a3a505f9d9 (diff) | |
download | pfsense-3a343d7384fbf78f987e8c4c2d9f307d22c8a072.zip pfsense-3a343d7384fbf78f987e8c4c2d9f307d22c8a072.tar.gz |
Refine saving/applying on more pages - don't show apply or take an action unless the user is allowed to do that.
Diffstat (limited to 'usr/local/www/firewall_nat_out.php')
-rwxr-xr-x | usr/local/www/firewall_nat_out.php | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/usr/local/www/firewall_nat_out.php b/usr/local/www/firewall_nat_out.php index 5098532..1a6734f 100755 --- a/usr/local/www/firewall_nat_out.php +++ b/usr/local/www/firewall_nat_out.php @@ -214,8 +214,8 @@ if (isset($_POST['save']) && $_POST['save'] == "Save") { } break; } - write_config(); - mark_subsystem_dirty('natconf'); + if (write_config()) + mark_subsystem_dirty('natconf'); header("Location: firewall_nat_out.php"); exit; } @@ -223,8 +223,8 @@ if (isset($_POST['save']) && $_POST['save'] == "Save") { if ($_GET['act'] == "del") { if ($a_out[$_GET['id']]) { unset($a_out[$_GET['id']]); - write_config(); - mark_subsystem_dirty('natconf'); + if (write_config()) + mark_subsystem_dirty('natconf'); header("Location: firewall_nat_out.php"); exit; } @@ -236,8 +236,8 @@ if (isset($_POST['del_x'])) { foreach ($_POST['rule'] as $rulei) { unset($a_out[$rulei]); } - write_config(); - mark_subsystem_dirty('natconf'); + if (write_config()) + mark_subsystem_dirty('natconf'); header("Location: firewall_nat_out.php"); exit; } @@ -283,8 +283,8 @@ if (isset($_POST['del_x'])) { else unset($config['nat']['advancedoutbound']); - write_config(); - mark_subsystem_dirty('natconf'); + if (write_config()) + mark_subsystem_dirty('natconf'); header("Location: firewall_nat_out.php"); exit; } |