From faf207f1f738df8947c3d4d8c39c67b8c9dfd18f Mon Sep 17 00:00:00 2001 From: jim-p Date: Wed, 11 Aug 2010 12:01:43 -0400 Subject: Add
tag, submit, and reset button here. --- usr/local/www/status_lb_pool.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'usr/local') diff --git a/usr/local/www/status_lb_pool.php b/usr/local/www/status_lb_pool.php index 47eb31d..87fa4cf 100755 --- a/usr/local/www/status_lb_pool.php +++ b/usr/local/www/status_lb_pool.php @@ -77,6 +77,7 @@ foreach( (array) $relayctl as $line) { + + +
+
+ "> + "> +
- +
-- cgit v1.1 From 938bda3aed4410a3144361441529e0833d97a90e Mon Sep 17 00:00:00 2001 From: jim-p Date: Wed, 11 Aug 2010 12:05:21 -0400 Subject: Remove the gateway load balancer status code, that has all moved away from here to Status > Gateways and is no longer needed. --- usr/local/www/status_lb_pool.php | 46 ++-------------------------------------- 1 file changed, 2 insertions(+), 44 deletions(-) (limited to 'usr/local') diff --git a/usr/local/www/status_lb_pool.php b/usr/local/www/status_lb_pool.php index 87fa4cf..230dea5 100755 --- a/usr/local/www/status_lb_pool.php +++ b/usr/local/www/status_lb_pool.php @@ -162,52 +162,10 @@ foreach( (array) $relayctl as $line) { - - "; - } - } else { - PRINT ""; - } - ?> -
$online "; - if($lastchange <> "") { - PRINTF(gettext("Last change %s"),$lastchange); - } else { - PRINT(gettext("No changes found in logfile")); - } - PRINT "
{$vipent['monitor']}
+ - + Date: Wed, 11 Aug 2010 12:12:44 -0400 Subject: Formatting/whitespace fixes. --- usr/local/www/status_lb_pool.php | 188 +++++++++++++++++++-------------------- 1 file changed, 93 insertions(+), 95 deletions(-) (limited to 'usr/local') diff --git a/usr/local/www/status_lb_pool.php b/usr/local/www/status_lb_pool.php index 230dea5..9212cd1 100755 --- a/usr/local/www/status_lb_pool.php +++ b/usr/local/www/status_lb_pool.php @@ -28,7 +28,7 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* +/* pfSense_MODULE: routing */ @@ -50,7 +50,7 @@ $lb_logfile = "{$g['varlog_path']}/relayd.log"; $nentries = $config['syslog']['nentries']; if (!$nentries) - $nentries = 50; + $nentries = 50; $now = time(); $year = date("Y"); @@ -63,13 +63,13 @@ $relay_hosts=Array(); foreach( (array) $relayctl as $line) { $t=split("\t", $line); switch (trim($t[1])) { - case "table": - $curpool=trim($t[2]); - break; - case "host": - $curhost=trim($t[2]); - $relay_hosts[$curpool][$curhost]['state']=trim($t[4]); - break; + case "table": + $curpool=trim($t[2]); + break; + case "host": + $curhost=trim($t[2]); + $relay_hosts[$curpool][$curhost]['state']=trim($t[4]); + break; } } @@ -79,95 +79,93 @@ foreach( (array) $relayctl as $line) {
- - - + +
- -
+
+ +
- - - - - - - - - - - - - + - + - + + -
- - - - - - "; - switch ($vipent['mode']) { - case 'loadbalance': - if($svr[0]!="") PRINT ""; - break; - case 'failover': - if($svr[0]!="") PRINT ""; - break; - } - PRINT ""; - } - } - foreach ((array) $vipent['serversdisabled'] as $server) { - $svr = split("\|", $server); - - PRINT ""; - switch ($vipent['mode']) { - case 'loadbalance': - if($svr[0]!="") PRINT ""; +
{$svr[0]}:{$vipent['port']}
+ + + + + + + + + + + + - "; + } + } + foreach ((array) $vipent['serversdisabled'] as $server) { + $svr = split("\|", $server); + PRINT ""; + switch ($vipent['mode']) { + case 'loadbalance': + if($svr[0]!="") PRINT ""; + break; + case 'failover': + if($svr[0]!="") PRINT ""; + break; + } + PRINT ""; + } + ?> +
+ + + + + + "; + switch ($vipent['mode']) { + case 'loadbalance': + if($svr[0]!="") PRINT ""; break; - case 'failover': - if($svr[0]!="") PRINT ""; + case 'failover': + if($svr[0]!="") PRINT ""; break; - } - PRINT ""; } - ?> -
{$svr[0]}:{$vipent['port']}
-
+ PRINT " {$svr[0]}:{$vipent['port']}
{$svr[0]}:{$vipent['port']}
+
- + -
"> - "> + ">
-
+
+
-- cgit v1.1 From 3b370abf73aa327ad490c37b9ad9aefb777a321c Mon Sep 17 00:00:00 2001 From: jim-p Date: Wed, 11 Aug 2010 12:31:18 -0400 Subject: Change these PRINTs to echo for consistency, and reformat a little. Wrap vars inside strings in {}. --- usr/local/www/status_lb_pool.php | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'usr/local') diff --git a/usr/local/www/status_lb_pool.php b/usr/local/www/status_lb_pool.php index 9212cd1..fa591b9 100755 --- a/usr/local/www/status_lb_pool.php +++ b/usr/local/www/status_lb_pool.php @@ -131,30 +131,34 @@ foreach( (array) $relayctl as $line) { default: $bgcolor = "lightcoral"; } - PRINT ""; + echo ""; switch ($vipent['mode']) { case 'loadbalance': - if($svr[0]!="") PRINT ""; + if($svr[0]!="") + echo ""; break; case 'failover': - if($svr[0]!="") PRINT ""; + if($svr[0]!="") + echo ""; break; } - PRINT " {$svr[0]}:{$vipent['port']} "; + echo " {$svr[0]}:{$vipent['port']} "; } } foreach ((array) $vipent['serversdisabled'] as $server) { $svr = split("\|", $server); - PRINT ""; + echo ""; switch ($vipent['mode']) { case 'loadbalance': - if($svr[0]!="") PRINT ""; + if($svr[0]!="") + echo ""; break; case 'failover': - if($svr[0]!="") PRINT ""; + if($svr[0]!="") + echo ""; break; } - PRINT " {$svr[0]}:{$vipent['port']} "; + echo " {$svr[0]}:{$vipent['port']} "; } ?> -- cgit v1.1 From 191b00d9633770222558bffdbc3559063e62b9f6 Mon Sep 17 00:00:00 2001 From: jim-p Date: Wed, 11 Aug 2010 12:41:54 -0400 Subject: Rename $vipent to $pool here since we only deal with pools and the old name doesn't make sense in this context. --- usr/local/www/status_lb_pool.php | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'usr/local') diff --git a/usr/local/www/status_lb_pool.php b/usr/local/www/status_lb_pool.php index fa591b9..a6a446b 100755 --- a/usr/local/www/status_lb_pool.php +++ b/usr/local/www/status_lb_pool.php @@ -99,14 +99,14 @@ foreach( (array) $relayctl as $line) { - + - + "; - switch ($vipent['mode']) { + switch ($pool['mode']) { case 'loadbalance': if($svr[0]!="") - echo ""; + echo ""; break; case 'failover': if($svr[0]!="") - echo ""; + echo ""; break; } - echo ""; + echo ""; } } - foreach ((array) $vipent['serversdisabled'] as $server) { + foreach ((array) $pool['serversdisabled'] as $server) { $svr = split("\|", $server); echo ""; - switch ($vipent['mode']) { + switch ($pool['mode']) { case 'loadbalance': if($svr[0]!="") - echo ""; + echo ""; break; case 'failover': if($svr[0]!="") - echo ""; + echo ""; break; } - echo ""; + echo ""; } ?>
{$svr[0]}:{$vipent['port']}
{$svr[0]}:{$pool['port']}
{$svr[0]}:{$vipent['port']}
{$svr[0]}:{$pool['port']}
- + - + Date: Wed, 11 Aug 2010 13:44:34 -0400 Subject: Add 8021.x preauth (rsn_preauth) --- usr/local/www/interfaces.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'usr/local') diff --git a/usr/local/www/interfaces.php b/usr/local/www/interfaces.php index 19ae18a..3b96743 100755 --- a/usr/local/www/interfaces.php +++ b/usr/local/www/interfaces.php @@ -275,6 +275,7 @@ if (isset($wancfg['wireless'])) { $pconfig['wpa_strict_rekey'] = isset($wancfg['wireless']['wpa']['wpa_strict_rekey']); $pconfig['passphrase'] = $wancfg['wireless']['wpa']['passphrase']; $pconfig['ieee8021x'] = isset($wancfg['wireless']['wpa']['ieee8021x']['enable']); + $pconfig['rsn_preauth'] = isset($wancfg['wireless']['wpa']['rsn_preauth']['enable']); $pconfig['ext_wpa_sw'] = $wancfg['wireless']['wpa']['ext_wpa_sw']; $pconfig['wpa_enable'] = isset($wancfg['wireless']['wpa']['enable']); } @@ -745,6 +746,10 @@ function handle_wireless_post() { $wancfg['wireless']['wpa']['mac_acl_enable'] = true; else if (isset($wancfg['wireless']['wpa']['mac_acl_enable'])) unset($wancfg['wireless']['wpa']['mac_acl_enable']); + if ($_POST['rsn_preauth'] == "yes") + $wancfg['wireless']['wpa']['rsn_preauth']['enable'] = true; + else + unset($wancfg['wireless']['wpa']['rsn_preauth']['enable']); if ($_POST['ieee8021x'] == "yes") $wancfg['wireless']['wpa']['ieee8021x']['enable'] = true; else if (isset($wancfg['wireless']['wpa']['ieee8021x']['enable'])) @@ -1948,6 +1953,13 @@ $types = array("none" => gettext("None"), "static" => gettext("Static"), "dhcp"
+ + 802.1X + + > +
+ + -- cgit v1.1 From 82d0dfb39993a516b54f8216ceea9f722c5681c5 Mon Sep 17 00:00:00 2001 From: jim-p Date: Wed, 11 Aug 2010 13:55:37 -0400 Subject: When adding to a pool in manual failover mode, enforce the one-active limit also. --- usr/local/www/load_balancer_pool_edit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr/local') diff --git a/usr/local/www/load_balancer_pool_edit.php b/usr/local/www/load_balancer_pool_edit.php index e8529ac..2764a92 100755 --- a/usr/local/www/load_balancer_pool_edit.php +++ b/usr/local/www/load_balancer_pool_edit.php @@ -226,7 +226,7 @@ function clearcombo(){ - " onclick="AddServerToPool(document.iform);">
+ " onclick="AddServerToPool(document.iform); enforceFailover(); checkPoolControls();">
-- cgit v1.1 From 0c450e7186b6436597f77615e3fe935ddfc0bf28 Mon Sep 17 00:00:00 2001 From: jim-p Date: Wed, 11 Aug 2010 14:46:51 -0400 Subject: Allow batch Server LB/Failover pool changes from the Pool status screen. For LB pools, you can pick via checkbox any number of active pool servers. For manual failover types, you can choose the active server. --- usr/local/www/status_lb_pool.php | 63 +++++++++++++++++++++++++++++++++------- 1 file changed, 53 insertions(+), 10 deletions(-) (limited to 'usr/local') diff --git a/usr/local/www/status_lb_pool.php b/usr/local/www/status_lb_pool.php index a6a446b..c135ef0 100755 --- a/usr/local/www/status_lb_pool.php +++ b/usr/local/www/status_lb_pool.php @@ -39,7 +39,10 @@ ##|*MATCH=status_lb_pool.php* ##|-PRIV -require("guiconfig.inc"); +require_once("guiconfig.inc"); +require_once("functions.inc"); +require_once("filter.inc"); +require_once("shaper.inc"); if (!is_array($config['load_balancer']['lbpool'])) { $config['load_balancer']['lbpool'] = array(); @@ -73,11 +76,54 @@ foreach( (array) $relayctl as $line) { } } +if ($_POST) { + if ($_POST['apply']) { + $retval = 0; + $retval |= filter_configure(); + $retval |= relayd_configure(); + $savemsg = get_std_save_message($retval); + clear_subsystem_dirty('loadbalancer'); + } else { + /* Keep a list of servers we find in POST variables */ + $newservers = array(); + foreach ($_POST as $name => $value) { + /* Look through the POST vars to find the pool data */ + if (strpos($name, '|') !== false){ + list($poolname, $ip) = explode("|", $name); + $ip = str_replace('_', '.', $ip); + $newservers[$poolname][] = $ip; + } elseif (is_ipaddr($value)) { + $newservers[$name][] = $value; + } + } + foreach ($a_pool as & $pool) { + if (is_array($pool['servers']) && is_array($pool['serversdisabled'])) { + $oldservers = array_merge($pool['servers'], $pool['serversdisabled']); + } elseif (is_array($pool['servers'])) { + $oldservers = $pool['servers']; + } elseif (is_array($pool['serversdisabled'])) { + $oldservers = $pool['serversdisabled']; + } else { + $oldservers = array(); + } + if (is_array($newservers[$pool['name']])) { + $pool['servers'] = $newservers[$pool['name']]; + $pool['serversdisabled'] = array_diff($oldservers, $newservers[$pool['name']]); + } + } + mark_subsystem_dirty('loadbalancer'); + write_config("Updated load balancer pools via status screen."); + } +} + ?>
+

+"));?>
+ - + "; + echo "\n"; break; case 'failover': if($svr[0]!="") - echo ""; + echo "\n"; break; } echo ""; @@ -151,11 +197,11 @@ foreach( (array) $relayctl as $line) { switch ($pool['mode']) { case 'loadbalance': if($svr[0]!="") - echo ""; + echo "\n"; break; case 'failover': if($svr[0]!="") - echo ""; + echo "\n"; break; } echo ""; @@ -170,10 +216,7 @@ foreach( (array) $relayctl as $line) { - + -- cgit v1.1 From baa59e4e57919b75f087b6cdd9866b8506c8570f Mon Sep 17 00:00:00 2001 From: jim-p Date: Wed, 11 Aug 2010 16:44:59 -0400 Subject: Fix gettext() call --- usr/local/www/status_wireless.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr/local') diff --git a/usr/local/www/status_wireless.php b/usr/local/www/status_wireless.php index 4e2a313..9f423b0 100755 --- a/usr/local/www/status_wireless.php +++ b/usr/local/www/status_wireless.php @@ -74,7 +74,7 @@ foreach($ciflist as $interface => $ifdescr) { $enabled = false; if($if == $interface) $enabled = true; - $tab_array[] = array(printf(gettext("Status (%s)"),$ifdescr), $enabled, "status_wireless.php?if={$interface}"); + $tab_array[] = array(printf(gettext("Status") . " (%s)",$ifdescr), $enabled, "status_wireless.php?if={$interface}"); } } $rwlif = get_real_interface($if); -- cgit v1.1 From 73eb4b90d4631c6817585d159815fcd5d9574926 Mon Sep 17 00:00:00 2001 From: jim-p Date: Wed, 11 Aug 2010 16:46:51 -0400 Subject: Fix another gettext() call. --- usr/local/www/status_wireless.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr/local') diff --git a/usr/local/www/status_wireless.php b/usr/local/www/status_wireless.php index 9f423b0..7185dec 100755 --- a/usr/local/www/status_wireless.php +++ b/usr/local/www/status_wireless.php @@ -140,7 +140,7 @@ display_top_tabs($tab_array); /* table header */ print "\n"; - printf(gettext("%s%s%sAssociated or ad-hoc peers.%s%s%s%s"),'','','','\n'); + printf("%s%s%s" . gettext("Associated or ad-hoc peers") ."%s%s%s%s",'','','','\n'); print ""; print ""; print ""; -- cgit v1.1 From ca5bb211572bbcc59494177f56505fafda92a1f3 Mon Sep 17 00:00:00 2001 From: jim-p Date: Wed, 11 Aug 2010 16:48:56 -0400 Subject: This should be sprintf --- usr/local/www/status_wireless.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr/local') diff --git a/usr/local/www/status_wireless.php b/usr/local/www/status_wireless.php index 7185dec..2686d26 100755 --- a/usr/local/www/status_wireless.php +++ b/usr/local/www/status_wireless.php @@ -74,7 +74,7 @@ foreach($ciflist as $interface => $ifdescr) { $enabled = false; if($if == $interface) $enabled = true; - $tab_array[] = array(printf(gettext("Status") . " (%s)",$ifdescr), $enabled, "status_wireless.php?if={$interface}"); + $tab_array[] = array(sprintf(gettext("Status") . " (%s)",$ifdescr), $enabled, "status_wireless.php?if={$interface}"); } } $rwlif = get_real_interface($if); -- cgit v1.1 From 5943a23ff75f1dd64f03e806703e70fd0e34246a Mon Sep 17 00:00:00 2001 From: jim-p Date: Wed, 11 Aug 2010 16:53:03 -0400 Subject: This probably shouldn't be a printf anyhow --- usr/local/www/status_wireless.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr/local') diff --git a/usr/local/www/status_wireless.php b/usr/local/www/status_wireless.php index 2686d26..02ad183 100755 --- a/usr/local/www/status_wireless.php +++ b/usr/local/www/status_wireless.php @@ -140,7 +140,7 @@ display_top_tabs($tab_array); /* table header */ print "\n"; - printf("%s%s%s" . gettext("Associated or ad-hoc peers") ."%s%s%s%s",'','','','\n'); + print "\n"; print ""; print ""; print ""; -- cgit v1.1 From 24357d92f8c41f67ba6497282ea684535ba56290 Mon Sep 17 00:00:00 2001 From: jim-p Date: Wed, 11 Aug 2010 16:53:59 -0400 Subject: This doesn't really need a printf either, come to think of it. --- usr/local/www/status_wireless.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr/local') diff --git a/usr/local/www/status_wireless.php b/usr/local/www/status_wireless.php index 02ad183..0aa56ba 100755 --- a/usr/local/www/status_wireless.php +++ b/usr/local/www/status_wireless.php @@ -74,7 +74,7 @@ foreach($ciflist as $interface => $ifdescr) { $enabled = false; if($if == $interface) $enabled = true; - $tab_array[] = array(sprintf(gettext("Status") . " (%s)",$ifdescr), $enabled, "status_wireless.php?if={$interface}"); + $tab_array[] = array(gettext("Status") . " ({$ifdescr})", $enabled, "status_wireless.php?if={$interface}"); } } $rwlif = get_real_interface($if); -- cgit v1.1 From e34f19ec25e50104c09f262bcda2e5346b675f36 Mon Sep 17 00:00:00 2001 From: Eirik Oeverby Date: Wed, 11 Aug 2010 23:42:15 +0200 Subject: Made LB pool status page follow natural (expected) order no matter which host(s) is/are active. --- usr/local/www/status_lb_pool.php | 47 ++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 23 deletions(-) (limited to 'usr/local') diff --git a/usr/local/www/status_lb_pool.php b/usr/local/www/status_lb_pool.php index c135ef0..b288bd8 100755 --- a/usr/local/www/status_lb_pool.php +++ b/usr/local/www/status_lb_pool.php @@ -167,44 +167,45 @@ if ($_POST) {
@@ -135,11 +181,11 @@ foreach( (array) $relayctl as $line) { switch ($pool['mode']) { case 'loadbalance': if($svr[0]!="") - echo " {$svr[0]}:{$pool['port']}
{$svr[0]}:{$pool['port']}
"> -- cgit v1.1 From ac8c5e564341279a3a82700ab6dc3ebd61ae52da Mon Sep 17 00:00:00 2001 From: Erik Fonnesbeck Date: Wed, 11 Aug 2010 14:13:32 -0600 Subject: Do not try to bring down a CARP VIP for an entry that does not exist yet. Fixes #819 --- usr/local/www/firewall_virtual_ip_edit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr/local') diff --git a/usr/local/www/firewall_virtual_ip_edit.php b/usr/local/www/firewall_virtual_ip_edit.php index 6a7c198..e215253 100755 --- a/usr/local/www/firewall_virtual_ip_edit.php +++ b/usr/local/www/firewall_virtual_ip_edit.php @@ -149,7 +149,7 @@ if ($_POST) { } else if ($parent_sn != $_POST['subnet_bits']) $input_errors[] = gettext("Subnet bits needs to be the same as the parent interface."); - if ($a_vip[$id]['vhid'] != $_POST['vhid']) + if (isset($id) && ($a_vip[$id]) && $a_vip[$id]['vhid'] != $_POST['vhid']) interface_vip_bring_down($a_vip[$id]); } -- cgit v1.1 From ea62cd32700aac6bb62311813775b5d584812d92 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Wed, 11 Aug 2010 16:21:32 -0400 Subject: No need to set enable --- usr/local/www/interfaces.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'usr/local') diff --git a/usr/local/www/interfaces.php b/usr/local/www/interfaces.php index 3b96743..db6cee4 100755 --- a/usr/local/www/interfaces.php +++ b/usr/local/www/interfaces.php @@ -275,7 +275,7 @@ if (isset($wancfg['wireless'])) { $pconfig['wpa_strict_rekey'] = isset($wancfg['wireless']['wpa']['wpa_strict_rekey']); $pconfig['passphrase'] = $wancfg['wireless']['wpa']['passphrase']; $pconfig['ieee8021x'] = isset($wancfg['wireless']['wpa']['ieee8021x']['enable']); - $pconfig['rsn_preauth'] = isset($wancfg['wireless']['wpa']['rsn_preauth']['enable']); + $pconfig['rsn_preauth'] = isset($wancfg['wireless']['wpa']['rsn_preauth']); $pconfig['ext_wpa_sw'] = $wancfg['wireless']['wpa']['ext_wpa_sw']; $pconfig['wpa_enable'] = isset($wancfg['wireless']['wpa']['enable']); } @@ -747,9 +747,9 @@ function handle_wireless_post() { else if (isset($wancfg['wireless']['wpa']['mac_acl_enable'])) unset($wancfg['wireless']['wpa']['mac_acl_enable']); if ($_POST['rsn_preauth'] == "yes") - $wancfg['wireless']['wpa']['rsn_preauth']['enable'] = true; + $wancfg['wireless']['wpa']['rsn_preauth'] = true; else - unset($wancfg['wireless']['wpa']['rsn_preauth']['enable']); + unset($wancfg['wireless']['wpa']['rsn_preauth']); if ($_POST['ieee8021x'] == "yes") $wancfg['wireless']['wpa']['ieee8021x']['enable'] = true; else if (isset($wancfg['wireless']['wpa']['ieee8021x']['enable'])) -- cgit v1.1 From 54e73f5f0ec75d387b5d462b29a41c7d5371d366 Mon Sep 17 00:00:00 2001 From: jim-p Date: Wed, 11 Aug 2010 16:40:52 -0400 Subject: Show selected properly for the LB mode. --- usr/local/www/load_balancer_pool_edit.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr/local') diff --git a/usr/local/www/load_balancer_pool_edit.php b/usr/local/www/load_balancer_pool_edit.php index 2764a92..818521f 100755 --- a/usr/local/www/load_balancer_pool_edit.php +++ b/usr/local/www/load_balancer_pool_edit.php @@ -176,8 +176,8 @@ function clearcombo(){
','','
','
','','
','
ADDRAID
','','
','
" . gettext("Associated or ad-hoc peers") . "
ADDRAID "; switch ($pool['mode']) { case 'loadbalance': - if($svr[0]!="") - echo "\n"; + echo "\n"; break; case 'failover': - if($svr[0]!="") - echo "\n"; + echo "\n"; break; } - echo ""; - } - } - foreach ((array) $pool['serversdisabled'] as $server) { - $svr = split("\|", $server); - echo ""; - switch ($pool['mode']) { - case 'loadbalance': - if($svr[0]!="") - echo "\n"; - break; - case 'failover': - if($svr[0]!="") - echo "\n"; - break; + echo ""; } - echo ""; } ?>
{$svr[0]}:{$pool['port']}
{$server['ip']['addr']}:{$pool['port']}
{$svr[0]}:{$pool['port']}
-- cgit v1.1 From 3a3fb8eabaec1b4eb5ba86a124028916931a2011 Mon Sep 17 00:00:00 2001 From: Erik Fonnesbeck Date: Wed, 11 Aug 2010 16:15:13 -0600 Subject: Fix printf/sprintf mixups. --- usr/local/www/pkg_mgr_settings.php | 2 +- usr/local/www/services_captiveportal_vouchers_edit.php | 2 +- usr/local/www/services_dhcp.php | 4 ++-- usr/local/www/status_rrd_graph_img.php | 10 +++++----- usr/local/www/system.php | 2 +- usr/local/www/system_advanced_admin.php | 2 +- usr/local/www/wizard.php | 2 +- usr/local/www/xmlrpc.php | 4 ++-- 8 files changed, 14 insertions(+), 14 deletions(-) (limited to 'usr/local') diff --git a/usr/local/www/pkg_mgr_settings.php b/usr/local/www/pkg_mgr_settings.php index 650a4ab..99bf636 100644 --- a/usr/local/www/pkg_mgr_settings.php +++ b/usr/local/www/pkg_mgr_settings.php @@ -109,7 +109,7 @@ function enable_altpkgrepourl(enable_over) {
:
- , . + , . diff --git a/usr/local/www/services_captiveportal_vouchers_edit.php b/usr/local/www/services_captiveportal_vouchers_edit.php index 932837e..bd9ad73 100644 --- a/usr/local/www/services_captiveportal_vouchers_edit.php +++ b/usr/local/www/services_captiveportal_vouchers_edit.php @@ -116,7 +116,7 @@ if ($_POST) { $rollent['active'] = array(); voucher_write_used_db($rollent['number'], $rollent['used']); voucher_write_active_db($rollent['number'], array()); // create empty DB - voucher_log(LOG_INFO,printf(gettext("All %s vouchers from Roll %s marked unused"), $rollent['count'], $rollent['number'])); + voucher_log(LOG_INFO,sprintf(gettext("All %s vouchers from Roll %s marked unused"), $rollent['count'], $rollent['number'])); } else { // existing roll has been modified but without changing the count // read active and used DB from ramdisk and store it in XML config diff --git a/usr/local/www/services_dhcp.php b/usr/local/www/services_dhcp.php index dd64b82..3a0502c 100755 --- a/usr/local/www/services_dhcp.php +++ b/usr/local/www/services_dhcp.php @@ -248,7 +248,7 @@ if ($_POST) { foreach($config['virtualip']['vip'] as $vip) { if($vip['interface'] == $if) if($vip['subnet'] && is_inrange($vip['subnet'], $_POST['range_from'], $_POST['range_to'])) - $input_errors[] = printf(gettext("The subnet range cannot overlap with virtual IP address %s."),$vip['subnet']); + $input_errors[] = sprintf(gettext("The subnet range cannot overlap with virtual IP address %s."),$vip['subnet']); } } @@ -274,7 +274,7 @@ if ($_POST) { /* make sure that the DHCP Relay isn't enabled on this interface */ if (isset($config['dhcrelay'][$if]['enable'])) - $input_errors[] = printf(gettext("You must disable the DHCP relay on the %s interface before enabling the DHCP server."),$iflist[$if]); + $input_errors[] = sprintf(gettext("You must disable the DHCP relay on the %s interface before enabling the DHCP server."),$iflist[$if]); } } diff --git a/usr/local/www/status_rrd_graph_img.php b/usr/local/www/status_rrd_graph_img.php index bc974b1..6414a9c 100644 --- a/usr/local/www/status_rrd_graph_img.php +++ b/usr/local/www/status_rrd_graph_img.php @@ -189,7 +189,7 @@ $rrdcolors = "./themes/{$g['theme']}/rrdcolors.inc.php"; if(file_exists($rrdcolors)) { include($rrdcolors); } else { - log_error(printf(gettext("rrdcolors.inc.php for theme %s does not exist, using defaults!"),$g['theme'])); + log_error(sprintf(gettext("rrdcolors.inc.php for theme %s does not exist, using defaults!"),$g['theme'])); $colortrafficup = array("666666", "CCCCCC"); $colortrafficdown = array("990000", "CC0000"); $colorpacketsup = array("666666", "CCCCCC"); @@ -910,7 +910,7 @@ elseif((strstr($curdatabase, "-cellular.rrd")) && (file_exists("$rrddbpath$curda } else { $data = false; - log_error(printf(gettext("Sorry we do not have data to graph for %s"),$curdatabase)); + log_error(sprintf(gettext("Sorry we do not have data to graph for %s"),$curdatabase)); } /* check modification time to see if we need to generate image */ @@ -930,16 +930,16 @@ if (file_exists("$rrdtmppath$curdatabase-$curgraph.png")) { usleep(500); } if(($graphcmdreturn <> 0) || (! $data)) { - log_error(printf(gettext("Failed to create graph with error code %s, the error is: %s"),$graphcmdreturn,$graphcmdoutput)); + log_error(sprintf(gettext("Failed to create graph with error code %s, the error is: %s"),$graphcmdreturn,$graphcmdoutput)); if(strstr($curdatabase, "queues")) { - log_error(printf(gettext("failed to create graph from %s%s, removing database"),$rrddbpath,$curdatabase)); + log_error(sprintf(gettext("failed to create graph from %s%s, removing database"),$rrddbpath,$curdatabase)); exec("/bin/rm -f $rrddbpath$curif$queues"); flush(); usleep(500); enable_rrd_graphing(); } if(strstr($curdatabase, "queuesdrop")) { - log_error(printf(gettext("failed to create graph from %s%s, removing database"),$rrddbpath,$curdatabase)); + log_error(sprintf(gettext("failed to create graph from %s%s, removing database"),$rrddbpath,$curdatabase)); exec("/bin/rm -f $rrddbpath$curdatabase"); flush(); usleep(500); diff --git a/usr/local/www/system.php b/usr/local/www/system.php index 69a8f70..a9f55a5 100755 --- a/usr/local/www/system.php +++ b/usr/local/www/system.php @@ -334,7 +334,7 @@ include("head.inc");
- />
- Date: Wed, 11 Aug 2010 18:21:07 -0600 Subject: Remove extra quotes that were added around some strings when adding printf+gettext in some areas. --- usr/local/www/diag_traceroute.php | 2 +- usr/local/www/interfaces.php | 6 +++--- usr/local/www/interfaces_assign.php | 6 +++--- usr/local/www/system.php | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'usr/local') diff --git a/usr/local/www/diag_traceroute.php b/usr/local/www/diag_traceroute.php index 62b42e5..9a949a2 100755 --- a/usr/local/www/diag_traceroute.php +++ b/usr/local/www/diag_traceroute.php @@ -63,7 +63,7 @@ if ($_POST || $_REQUEST['host']) { do_input_validation($_REQUEST, $reqdfields, $reqdfieldsn, &$input_errors); if (($_REQUEST['ttl'] < 1) || ($_REQUEST['ttl'] > MAX_TTL)) { - $input_errors[] = sprintf(gettext("Maximum number of hops must be between 1 and '%s'"), MAX_TLL); + $input_errors[] = sprintf(gettext("Maximum number of hops must be between 1 and %s"), MAX_TTL); } if (!$input_errors) { diff --git a/usr/local/www/interfaces.php b/usr/local/www/interfaces.php index db6cee4..0ef439b 100755 --- a/usr/local/www/interfaces.php +++ b/usr/local/www/interfaces.php @@ -178,7 +178,7 @@ $pconfig['enable'] = isset($wancfg['enable']); if (is_array($config['aliases']['alias'])) { foreach($config['aliases']['alias'] as $alias) { if($alias['name'] == $wancfg['descr']) { - $input_errors[] = sprintf(gettext("Sorry, an alias with the name '%s' already exists."),$wancfg['descr']); + $input_errors[] = sprintf(gettext("Sorry, an alias with the name %s already exists."),$wancfg['descr']); } } } @@ -845,7 +845,7 @@ function check_wireless_mode() { } } -$pgtitle = array(gettext("Interfaces"),sprintf(gettext("'%s'"),$pconfig['descr'])); +$pgtitle = array(gettext("Interfaces"), $pconfig['descr']); $statusurl = "status_interfaces.php"; $closehead = false; @@ -1015,7 +1015,7 @@ $types = array("none" => gettext("None"), "static" => gettext("Static"), "dhcp"

- ".gettext("You must apply the changes in order for them to take effect.")."

".gettext("Don't forget to adjust the DHCP Server range if needed after applying."));?>
+ ".gettext("You must apply the changes in order for them to take effect.")."

".gettext("Don't forget to adjust the DHCP Server range if needed after applying."));?>
diff --git a/usr/local/www/interfaces_assign.php b/usr/local/www/interfaces_assign.php index 9addbfa..1acebd5 100755 --- a/usr/local/www/interfaces_assign.php +++ b/usr/local/www/interfaces_assign.php @@ -182,8 +182,8 @@ if ($_POST['apply']) { /* Deliver error message for any port with more than one assignment */ foreach ($portifmap as $portname => $ifnames) { if (count($ifnames) > 1) { - $errstr = sprintf(gettext("Port '%s' ". - " was assigned to '%s'" . + $errstr = sprintf(gettext("Port %s ". + " was assigned to %s" . " interfaces:"), $portname, count($ifnames)); foreach ($portifmap[$portname] as $ifn) @@ -429,7 +429,7 @@ if(file_exists("/var/run/interface_mismatch_reboot_needed")) $portinfo): ?> - + -
- $portinfo): ?> -
 
+  
@@ -1991,10 +1992,6 @@ $types = array("none" => gettext("None"), "static" => gettext("Static"), "dhcp" "and obviously should not appear as the source address in any packets you receive"); ?>.
- - - -
  @@ -2010,7 +2007,8 @@ $types = array("none" => gettext("None"), "static" => gettext("Static"), "dhcp"
+ + -- cgit v1.1 From 4c807d76c6329b09b490a0263f072f7b4baa1d3a Mon Sep 17 00:00:00 2001 From: Erik Fonnesbeck Date: Wed, 11 Aug 2010 18:42:22 -0600 Subject: Fix text --- usr/local/www/firewall_aliases_edit.php | 2 +- usr/local/www/interfaces.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'usr/local') diff --git a/usr/local/www/firewall_aliases_edit.php b/usr/local/www/firewall_aliases_edit.php index b7c48e1..b0ae4a3 100755 --- a/usr/local/www/firewall_aliases_edit.php +++ b/usr/local/www/firewall_aliases_edit.php @@ -279,7 +279,7 @@ if ($_POST) { } } if ($wrongaliases <> "") - $input_errors[] = sprintf(gettext("The alias(es): %s %scannot be nested cause they are not of the same type."), $wrongaliases, " \n"); + $input_errors[] = sprintf(gettext("The alias(es): %s %scannot be nested because they are not of the same type."), $wrongaliases, " \n"); } if (!$input_errors) { diff --git a/usr/local/www/interfaces.php b/usr/local/www/interfaces.php index ee253a8..be0abbf 100755 --- a/usr/local/www/interfaces.php +++ b/usr/local/www/interfaces.php @@ -837,7 +837,7 @@ function check_wireless_mode() { $old_wireless_mode = $wancfg['wireless']['mode']; $wancfg['wireless']['mode'] = $_POST['mode']; if (!interface_wireless_clone("{$wlanif}_", $wancfg)) { - $input_errors[] = sprintf(gettext("Unable to change mode to %s . You may already have the maximum number of wireless clones supported in this mode."), $wlan_modes[$wancfg['wireless']['mode']]); + $input_errors[] = sprintf(gettext("Unable to change mode to %s. You may already have the maximum number of wireless clones supported in this mode."), $wlan_modes[$wancfg['wireless']['mode']]); } else { mwexec("/sbin/ifconfig {$wlanif}_ destroy"); } -- cgit v1.1 From e36c52f4c0cc9819f7fd6ed6daa3e0f36d57bba5 Mon Sep 17 00:00:00 2001 From: Erik Fonnesbeck Date: Wed, 11 Aug 2010 22:17:49 -0600 Subject: Remove or simplify some (s)printf calls. --- usr/local/www/firewall_rules.php | 2 +- usr/local/www/firewall_rules_edit.php | 2 +- usr/local/www/firewall_shaper_layer7.php | 2 +- usr/local/www/status_gateway_groups.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'usr/local') diff --git a/usr/local/www/firewall_rules.php b/usr/local/www/firewall_rules.php index 5646247..d8385f0 100755 --- a/usr/local/www/firewall_rules.php +++ b/usr/local/www/firewall_rules.php @@ -438,7 +438,7 @@ if($_REQUEST['undodrag']) { continue; $isadvset = check_for_advaned_options($filterent); if($isadvset) - $advanced_set = sprintf("", $g['theme'], gettext("advanced settings set"), $isadvset); + $advanced_set = ""; else $advanced_set = "" ?> diff --git a/usr/local/www/firewall_rules_edit.php b/usr/local/www/firewall_rules_edit.php index d722c01..77d56d4 100755 --- a/usr/local/www/firewall_rules_edit.php +++ b/usr/local/www/firewall_rules_edit.php @@ -741,7 +741,7 @@ include("head.inc"); if (is_array($config['nat']['rule'])) { foreach( $config['nat']['rule'] as $index => $nat_rule ) { if( isset($nat_rule['associated-rule-id']) && $nat_rule['associated-rule-id']==$pconfig['associated-rule-id'] ) { - printf("%s
", $index, gettext("View the NAT rule")); + echo "" . gettext("View the NAT rule") . "
"; break; } } diff --git a/usr/local/www/firewall_shaper_layer7.php b/usr/local/www/firewall_shaper_layer7.php index 7a58e12..d331c14 100755 --- a/usr/local/www/firewall_shaper_layer7.php +++ b/usr/local/www/firewall_shaper_layer7.php @@ -62,7 +62,7 @@ $statusurl = "status_queues.php"; $output_form = ""; $default_layer7shaper_msg = ""; -$default_layer7shaper_msg .= sprintf("

%s:
", gettext("Note")); +$default_layer7shaper_msg .= "

" . gettext("Note") . ":
"; $default_layer7shaper_msg .= "
" . gettext("You can add new layer7 protocol patterns by simply uploading the file") . " " . gettext("here") . ".
"; $default_layer7shaper_msg .= ""; diff --git a/usr/local/www/status_gateway_groups.php b/usr/local/www/status_gateway_groups.php index f70f539..f8d29de 100755 --- a/usr/local/www/status_gateway_groups.php +++ b/usr/local/www/status_gateway_groups.php @@ -97,7 +97,7 @@ include("head.inc"); echo ""; foreach($priorities as $number => $tier) { - printf(gettext("%sTier %s%s"), "", $number, ""); + echo "" . sprintf(gettext("Tier %s"), $number) . ""; } echo "\n"; -- cgit v1.1 From ddc55e124418ff8b417a4353afcc5a814af4041d Mon Sep 17 00:00:00 2001 From: Erik Fonnesbeck Date: Wed, 11 Aug 2010 22:18:34 -0600 Subject: Modify various (s)printf format strings to allow translations to change the order of the inserted strings. --- usr/local/www/diag_confbak.php | 4 ++-- usr/local/www/diag_logs_filter_summary.php | 2 +- usr/local/www/diag_logs_vpn.php | 2 +- usr/local/www/diag_pkglogs.php | 2 +- usr/local/www/firewall_aliases_edit.php | 4 ++-- usr/local/www/firewall_nat_out.php | 4 ++-- usr/local/www/interfaces_assign.php | 8 ++++---- usr/local/www/interfaces_wireless_edit.php | 2 +- usr/local/www/pkg_mgr.php | 2 +- usr/local/www/services_captiveportal_vouchers_edit.php | 2 +- usr/local/www/services_wol.php | 6 +++--- usr/local/www/status_rrd_graph_img.php | 2 +- usr/local/www/system_firmware_check.php | 2 +- usr/local/www/vpn_ipsec_phase1.php | 2 +- 14 files changed, 22 insertions(+), 22 deletions(-) (limited to 'usr/local') diff --git a/usr/local/www/diag_confbak.php b/usr/local/www/diag_confbak.php index 8c3ff7d..ec1f100 100755 --- a/usr/local/www/diag_confbak.php +++ b/usr/local/www/diag_confbak.php @@ -46,7 +46,7 @@ if($_GET['newver'] != "") { $confvers = unserialize(file_get_contents($g['cf_conf_path'] . '/backup/backup.cache')); if(config_restore($g['conf_path'] . '/backup/config-' . $_GET['newver'] . '.xml') == 0) - $savemsg = sprintf(gettext("Successfully reverted to timestamp %s with description \"%s\"."), date(gettext("n/j/y H:i:s"), $_GET['newver']), $confvers[$_GET['newver']]['description']); + $savemsg = sprintf(gettext('Successfully reverted to timestamp %1$s with description "%2$s".'), date(gettext("n/j/y H:i:s"), $_GET['newver']), $confvers[$_GET['newver']]['description']); else $savemsg = gettext("Unable to revert to the selected configuration."); conf_mount_ro(); @@ -56,7 +56,7 @@ if($_GET['rmver'] != "") { conf_mount_rw(); $confvers = unserialize(file_get_contents($g['cf_conf_path'] . '/backup/backup.cache')); unlink_if_exists($g['conf_path'] . '/backup/config-' . $_GET['rmver'] . '.xml'); - $savemsg = sprintf(gettext("Deleted backup with timestamp %s and description \"%s\"."), date(gettext("n/j/y H:i:s"), $_GET['rmver']),$confvers[$_GET['rmver']]['description']); + $savemsg = sprintf(gettext('Deleted backup with timestamp %1$s and description "%2$s".'), date(gettext("n/j/y H:i:s"), $_GET['rmver']),$confvers[$_GET['rmver']]['description']); conf_mount_ro(); } diff --git a/usr/local/www/diag_logs_filter_summary.php b/usr/local/www/diag_logs_filter_summary.php index 1171b89..96a2ecd 100644 --- a/usr/local/www/diag_logs_filter_summary.php +++ b/usr/local/www/diag_logs_filter_summary.php @@ -204,7 +204,7 @@ include("head.inc"); ?> -
+
- + diff --git a/usr/local/www/diag_pkglogs.php b/usr/local/www/diag_pkglogs.php index bf7be9e..9fb2b8f 100755 --- a/usr/local/www/diag_pkglogs.php +++ b/usr/local/www/diag_pkglogs.php @@ -112,7 +112,7 @@ include("head.inc"); + "") - $input_errors[] = sprintf(gettext("The alias(es): %s %scannot be nested because they are not of the same type."), $wrongaliases, " \n"); + $input_errors[] = sprintf(gettext('The alias(es): %1$s %2$scannot be nested because they are not of the same type.'), $wrongaliases, " \n"); } if (!$input_errors) { diff --git a/usr/local/www/firewall_nat_out.php b/usr/local/www/firewall_nat_out.php index d387385..ae72e07 100755 --- a/usr/local/www/firewall_nat_out.php +++ b/usr/local/www/firewall_nat_out.php @@ -108,7 +108,7 @@ if (isset($_POST['save']) && $_POST['save'] == "Save") { $natent = array(); $natent['source']['network'] = "{$osn}/{$ossubnet}"; $natent['dstport'] = "500"; - $natent['descr'] = sprintf(gettext("Auto created rule for ISAKMP - %s to %s"),$ifdesc,$ifdesc2); + $natent['descr'] = sprintf(gettext('Auto created rule for ISAKMP - %1$s to %2$s'),$ifdesc,$ifdesc2); $natent['target'] = ""; $natent['interface'] = $if2; $natent['destination']['any'] = true; @@ -118,7 +118,7 @@ if (isset($_POST['save']) && $_POST['save'] == "Save") { $natent = array(); $natent['source']['network'] = "{$osn}/{$ossubnet}"; $natent['sourceport'] = ""; - $natent['descr'] = sprintf(gettext("Auto created rule for %s to %s"),$ifdesc,$ifdesc2); + $natent['descr'] = sprintf(gettext('Auto created rule for %1$s to %2$s'),$ifdesc,$ifdesc2); $natent['target'] = ""; $natent['interface'] = $if2; $natent['destination']['any'] = true; diff --git a/usr/local/www/interfaces_assign.php b/usr/local/www/interfaces_assign.php index a67934f..565245b 100755 --- a/usr/local/www/interfaces_assign.php +++ b/usr/local/www/interfaces_assign.php @@ -182,9 +182,9 @@ if ($_POST['apply']) { /* Deliver error message for any port with more than one assignment */ foreach ($portifmap as $portname => $ifnames) { if (count($ifnames) > 1) { - $errstr = sprintf(gettext("Port %s ". - " was assigned to %s" . - " interfaces:"), $portname, count($ifnames)); + $errstr = sprintf(gettext('Port %1$s '. + ' was assigned to %2$s' . + ' interfaces:'), $portname, count($ifnames)); foreach ($portifmap[$portname] as $ifn) $errstr .= " " . $ifn; @@ -429,7 +429,7 @@ if(file_exists("/var/run/interface_mismatch_reboot_needed")) $portinfo): ?> - + -- cgit v1.1 From 48a27d4f33c60a8baf9af0053721d7ec9986361d Mon Sep 17 00:00:00 2001 From: Erik Fonnesbeck Date: Thu, 12 Aug 2010 01:59:53 -0600 Subject: Disable protocol box on associated rules, move the message, and clean up code a bit. --- usr/local/www/firewall_rules_edit.php | 117 +++++++++++++++++++--------------- 1 file changed, 66 insertions(+), 51 deletions(-) (limited to 'usr/local') diff --git a/usr/local/www/firewall_rules_edit.php b/usr/local/www/firewall_rules_edit.php index 77d56d4..f132ea9 100755 --- a/usr/local/www/firewall_rules_edit.php +++ b/usr/local/www/firewall_rules_edit.php @@ -187,6 +187,12 @@ if (isset($_GET['dup'])) if ($_POST) { + if( isset($a_filter[$id]['associated-rule-id']) ) { + $_POST['proto'] = $pconfig['proto']; + if ($pconfig['proto'] == "icmp") + $_POST['icmptype'] = $pconfig['icmptype']; + } + if ($_POST['type'] == "reject" && $_POST['proto'] <> "tcp") $input_errors[] = gettext("Reject type rules only works when the protocol is set to TCP."); @@ -260,8 +266,8 @@ if ($_POST) { /* input validation */ $reqdfields = explode(" ", "type proto"); if ( isset($a_filter[$id]['associated-rule-id'])===false ) { - $redqfields[] = "src"; - $redqfields[] = "dst"; + $reqdfields[] = "src"; + $reqdfields[] = "dst"; } $reqdfieldsn = explode(",", "Type,Protocol"); if ( isset($a_filter[$id]['associated-rule-id'])===false ) { @@ -518,6 +524,14 @@ if ($_POST) { // If we have an associated nat rule, make sure the source and destination doesn't change if( isset($a_filter[$id]['associated-rule-id']) ) { $filterent['interface'] = $a_filter[$id]['interface']; + if (isset($a_filter[$id]['protocol'])) + $filterent['protocol'] = $a_filter[$id]['protocol']; + else if (isset($filterent['protocol'])) + unset($filterent['protocol']); + if ($a_filter[$id]['protocol'] == "icmp" && $a_filter[$id]['icmptype']) + $filterent['icmptype'] = $a_filter[$id]['icmptype']; + else if (isset($filterent['icmptype'])) + unset($filterent['icmptype']); $filterent['source'] = $a_filter[$id]['source']; $filterent['destination'] = $a_filter[$id]['destination']; $filterent['associated-rule-id'] = $a_filter[$id]['associated-rule-id']; @@ -611,19 +625,41 @@ include("head.inc"); + + + + + + +
-
Config
Email AdressEmail Address
+
+
+
+ $nat_rule ) { + if( isset($nat_rule['associated-rule-id']) && $nat_rule['associated-rule-id']==$pconfig['associated-rule-id'] ) { + echo "" . gettext("View the NAT rule") . "
"; + break; + } + } + } + echo ""; + if (!empty($pconfig['interface'])) + echo ""; + ?> + +
-"; - } - if ($if == "FloatingRules" || isset($pconfig['floating'])): ?> - > - > - name="proto" class="formselect" onchange="proto_change()"> @@ -698,7 +734,7 @@ include("head.inc");
- name="icmptype" class="formselect"> gettext("any"), @@ -731,28 +767,7 @@ include("head.inc");
- - -
-
-
- $nat_rule ) { - if( isset($nat_rule['associated-rule-id']) && $nat_rule['associated-rule-id']==$pconfig['associated-rule-id'] ) { - echo "" . gettext("View the NAT rule") . "
"; - break; - } - } - } - ?> -
- - - name="srcnot" type="checkbox" id="srcnot" value="yes" > + name="srcnot" type="checkbox" id="srcnot" value="yes" >
@@ -762,7 +777,7 @@ include("head.inc");
:   - name="srctype" class="formselect" onChange="typesel_change()"> +
:   - autocomplete='off' name="src" type="text" class="formfldalias" id="src" size="20" value=""> / - name="srcmask" class="formselect" id="srcmask"> + autocomplete='off' name="src" type="text" class="formfldalias" id="src" size="20" value=""> / +

- type="button" onClick="show_source_port_range()" value=""> - + type="button" onClick="show_source_port_range()" value=""> -

@@ -814,27 +829,27 @@ include("head.inc"); :   - name="srcbeginport" class="formselect" onchange="src_rep_change();ext_change()"> + - autocomplete='off' class="formfldalias" name="srcbeginport_cust" id="srcbeginport_cust" type="text" size="5" value=""> + autocomplete='off' class="formfldalias" name="srcbeginport_cust" id="srcbeginport_cust" type="text" size="5" value=""> : - name="srcendport" class="formselect" onchange="ext_change()"> + - autocomplete='off' class="formfldalias" name="srcendport_cust" id="srcendport_cust" type="text" size="5" value=""> + autocomplete='off' class="formfldalias" name="srcendport_cust" id="srcendport_cust" type="text" size="5" value=""> @@ -845,7 +860,7 @@ include("head.inc"); - name="dstnot" type="checkbox" id="dstnot" value="yes" > + name="dstnot" type="checkbox" id="dstnot" value="yes" >
@@ -855,7 +870,7 @@ include("head.inc"); :   - name="dsttype" class="formselect" onChange="typesel_change()"> + name="dst" type="text" class="formfldalias" id="dst" size="20" value=""> / - name="dstmask" class="formselect" id="dstmask"> + name="dstbeginport" class="formselect" onchange="dst_rep_change();ext_change()"> $wkportdesc): ?> - autocomplete='off' class="formfldalias" name="dstbeginport_cust" id="dstbeginport_cust" type="text" size="5" value=""> + autocomplete='off' class="formfldalias" name="dstbeginport_cust" id="dstbeginport_cust" type="text" size="5" value=""> : - name="dstendport" class="formselect" onchange="ext_change()"> + - autocomplete='off' class="formfldalias" name="dstendport_cust" id="dstendport_cust" type="text" size="5" value=""> + autocomplete='off' class="formfldalias" name="dstendport_cust" id="dstendport_cust" type="text" size="5" value=""> -- cgit v1.1 From 8bb30d23a4255fb611ac0c05e11a4d221b7c45a4 Mon Sep 17 00:00:00 2001 From: Erik Fonnesbeck Date: Thu, 12 Aug 2010 04:18:13 -0600 Subject: Fix the ID for the link to the associated filter rule when a filter rule has not been saved since the associated rule was created. --- usr/local/www/firewall_nat_edit.php | 1 + 1 file changed, 1 insertion(+) (limited to 'usr/local') diff --git a/usr/local/www/firewall_nat_edit.php b/usr/local/www/firewall_nat_edit.php index 605876f..07d8bac 100755 --- a/usr/local/www/firewall_nat_edit.php +++ b/usr/local/www/firewall_nat_edit.php @@ -775,6 +775,7 @@ include("fbegin.inc"); ?> $filter_rule) { if (isset($filter_rule['associated-rule-id'])) { echo "