From 514dbaf8f0538e48ec1c60fde8d72d7ae18cd4ce Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Tue, 4 Apr 2006 21:18:19 +0000 Subject: [PATCH] When adding a redirect for FTP alert the user that it really creates 2 firewall rules Ticket #899 --- usr/local/www/firewall_nat.php | 12 ++++++++++-- usr/local/www/firewall_nat_edit.php | 8 ++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/usr/local/www/firewall_nat.php b/usr/local/www/firewall_nat.php index e1b4ba319d..c727982948 100755 --- a/usr/local/www/firewall_nat.php +++ b/usr/local/www/firewall_nat.php @@ -38,6 +38,10 @@ if (!is_array($config['nat']['rule'])) $a_nat = &$config['nat']['rule']; +/* if a custom message has been passed along, lets process it */ +if ($_GET['savemsg']) + $savemsg = $_GET['savemsg']; + if ($_POST) { $pconfig = $_POST; @@ -138,9 +142,13 @@ include("head.inc");
-

-You must apply the changes in order for them to take effect.");?> +The NAT configuration has been changed.
You must apply the changes in order for them to take effect."); + else + print_info_box_np("The NAT configuration has been changed.
You must apply the changes in order for them to take effect."); +?>
diff --git a/usr/local/www/firewall_nat_edit.php b/usr/local/www/firewall_nat_edit.php index de64ca05cd..80fab33c2b 100755 --- a/usr/local/www/firewall_nat_edit.php +++ b/usr/local/www/firewall_nat_edit.php @@ -222,6 +222,14 @@ if ($_POST) { $config['filter']['rule'][] = $filterent; + touch($d_filterconfdirty_path); + + write_config(); + + header("Location: firewall_nat.php?savemsg=The%20changes%20have%20been%20saved.%20%20Please%20note%20that%20we%20have%20added%20an%20additional%20rule%20for%20the%20FTP%20helper."); + + exit; + } touch($d_filterconfdirty_path);