diff options
author | Phil Davis <phil.davis@inf.org> | 2015-05-30 12:52:54 +0545 |
---|---|---|
committer | Phil Davis <phil.davis@inf.org> | 2015-05-30 12:52:54 +0545 |
commit | 2ee8dea1357deb254f46ead392ecca6d95af4cf7 (patch) | |
tree | 6bc69471fe0777ca125497801a916ff7e1e1e25c /usr/local/www/system_advanced_network.php | |
parent | 5dcec9f242a94894086dd425ecf9d2f00ccdebd5 (diff) | |
download | pfsense-2ee8dea1357deb254f46ead392ecca6d95af4cf7.zip pfsense-2ee8dea1357deb254f46ead392ecca6d95af4cf7.tar.gz |
Code style system a
Diffstat (limited to 'usr/local/www/system_advanced_network.php')
-rw-r--r-- | usr/local/www/system_advanced_network.php | 47 |
1 files changed, 26 insertions, 21 deletions
diff --git a/usr/local/www/system_advanced_network.php b/usr/local/www/system_advanced_network.php index 8a1debd..a9a6a2c 100644 --- a/usr/local/www/system_advanced_network.php +++ b/usr/local/www/system_advanced_network.php @@ -64,38 +64,39 @@ if ($_POST) { unset($input_errors); $pconfig = $_POST; - if ($_POST['ipv6nat_enable'] && !is_ipaddr($_POST['ipv6nat_ipaddr'])) + if ($_POST['ipv6nat_enable'] && !is_ipaddr($_POST['ipv6nat_ipaddr'])) { $input_errors[] = gettext("You must specify an IP address to NAT IPv6 packets."); + } ob_flush(); flush(); if (!$input_errors) { - if($_POST['ipv6nat_enable'] == "yes") { + if ($_POST['ipv6nat_enable'] == "yes") { $config['diag']['ipv6nat']['enable'] = true; $config['diag']['ipv6nat']['ipaddr'] = $_POST['ipv6nat_ipaddr']; } else { - if($config['diag']) { - if($config['diag']['ipv6nat']) { + if ($config['diag']) { + if ($config['diag']['ipv6nat']) { unset($config['diag']['ipv6nat']['enable']); unset($config['diag']['ipv6nat']['ipaddr']); } } } - if($_POST['ipv6allow'] == "yes") { + if ($_POST['ipv6allow'] == "yes") { $config['system']['ipv6allow'] = true; } else { unset($config['system']['ipv6allow']); } - if($_POST['prefer_ipv4'] == "yes") { + if ($_POST['prefer_ipv4'] == "yes") { $config['system']['prefer_ipv4'] = true; } else { unset($config['system']['prefer_ipv4']); } - if($_POST['sharednet'] == "yes") { + if ($_POST['sharednet'] == "yes") { $config['system']['sharednet'] = true; system_disable_arp_wrong_if(); } else { @@ -103,7 +104,7 @@ if ($_POST) { system_enable_arp_wrong_if(); } - if($_POST['polling_enable'] == "yes") { + if ($_POST['polling_enable'] == "yes") { $config['system']['polling'] = true; setup_polling(); } else { @@ -111,25 +112,25 @@ if ($_POST) { setup_polling(); } - if($_POST['flowtable'] == "yes") { + if ($_POST['flowtable'] == "yes") { $config['system']['flowtable'] = $_POST['flowtable']; } else { unset($config['system']['flowtable']); } - if($_POST['disablechecksumoffloading'] == "yes") { + if ($_POST['disablechecksumoffloading'] == "yes") { $config['system']['disablechecksumoffloading'] = true; } else { unset($config['system']['disablechecksumoffloading']); } - if($_POST['disablesegmentationoffloading'] == "yes") { + if ($_POST['disablesegmentationoffloading'] == "yes") { $config['system']['disablesegmentationoffloading'] = true; } else { unset($config['system']['disablesegmentationoffloading']); } - if($_POST['disablelargereceiveoffloading'] == "yes") { + if ($_POST['disablelargereceiveoffloading'] == "yes") { $config['system']['disablelargereceiveoffloading'] = true; } else { unset($config['system']['disablelargereceiveoffloading']); @@ -144,14 +145,15 @@ if ($_POST) { prefer_ipv4_or_ipv6(); $retval = filter_configure(); - if(stristr($retval, "error") <> true) + if (stristr($retval, "error") <> true) { $savemsg = get_std_save_message(gettext($retval)); - else + } else { $savemsg = gettext($retval); + } } } -$pgtitle = array(gettext("System"),gettext("Advanced: Networking")); +$pgtitle = array(gettext("System"), gettext("Advanced: Networking")); include("head.inc"); ?> @@ -163,10 +165,11 @@ include("head.inc"); //<![CDATA[ function enable_change(enable_over) { - if (document.iform.ipv6nat_enable.checked || enable_over) + if (document.iform.ipv6nat_enable.checked || enable_over) { document.iform.ipv6nat_ipaddr.disabled = 0; - else + } else { document.iform.ipv6nat_ipaddr.disabled = 1; + } } //]]> @@ -174,10 +177,12 @@ function enable_change(enable_over) { <? - if ($input_errors) + if ($input_errors) { print_input_errors($input_errors); - if ($savemsg) + } + if ($savemsg) { print_info_box($savemsg); + } ?> <form action="system_advanced_network.php" method="post" name="iform" id="iform"> <table width="100%" border="0" cellpadding="0" cellspacing="0" summary="system advanced newtwork"> @@ -199,7 +204,7 @@ function enable_change(enable_over) { <td id="mainarea"> <div class="tabcont"> <span class="vexpl"> - <span class="red"> + <span class="red"> <strong><?=gettext("NOTE:"); ?> </strong> </span> <?=gettext("The options on this page are intended for use by advanced users only."); ?> @@ -302,7 +307,7 @@ function enable_change(enable_over) { <?php /* $version = get_freebsd_version(); - if($version == "8"): + if ($version == "8"): <tr> <td colspan="2" class="list" height="12"> </td> |