summaryrefslogtreecommitdiffstats
path: root/usr/local/www/system_advanced_misc.php
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2015-05-30 12:52:54 +0545
committerPhil Davis <phil.davis@inf.org>2015-05-30 12:52:54 +0545
commit2ee8dea1357deb254f46ead392ecca6d95af4cf7 (patch)
tree6bc69471fe0777ca125497801a916ff7e1e1e25c /usr/local/www/system_advanced_misc.php
parent5dcec9f242a94894086dd425ecf9d2f00ccdebd5 (diff)
downloadpfsense-2ee8dea1357deb254f46ead392ecca6d95af4cf7.zip
pfsense-2ee8dea1357deb254f46ead392ecca6d95af4cf7.tar.gz
Code style system a
Diffstat (limited to 'usr/local/www/system_advanced_misc.php')
-rw-r--r--usr/local/www/system_advanced_misc.php250
1 files changed, 140 insertions, 110 deletions
diff --git a/usr/local/www/system_advanced_misc.php b/usr/local/www/system_advanced_misc.php
index 6d927df..3863eeb 100644
--- a/usr/local/www/system_advanced_misc.php
+++ b/usr/local/www/system_advanced_misc.php
@@ -71,22 +71,27 @@ $pconfig['use_mfs_var_size'] = $config['system']['use_mfs_var_size'];
$pconfig['pkg_nochecksig'] = isset($config['system']['pkg_nochecksig']);
$pconfig['powerd_ac_mode'] = "hadp";
-if (!empty($config['system']['powerd_ac_mode']))
+if (!empty($config['system']['powerd_ac_mode'])) {
$pconfig['powerd_ac_mode'] = $config['system']['powerd_ac_mode'];
+}
$pconfig['powerd_battery_mode'] = "hadp";
-if (!empty($config['system']['powerd_battery_mode']))
+if (!empty($config['system']['powerd_battery_mode'])) {
$pconfig['powerd_battery_mode'] = $config['system']['powerd_battery_mode'];
+}
$pconfig['powerd_normal_mode'] = "hadp";
-if (!empty($config['system']['powerd_normal_mode']))
+if (!empty($config['system']['powerd_normal_mode'])) {
$pconfig['powerd_normal_mode'] = $config['system']['powerd_normal_mode'];
+}
-$crypto_modules = array('glxsb' => gettext("AMD Geode LX Security Block"),
- 'aesni' => gettext("AES-NI CPU-based Acceleration"));
+$crypto_modules = array(
+ 'glxsb' => gettext("AMD Geode LX Security Block"),
+ 'aesni' => gettext("AES-NI CPU-based Acceleration"));
-$thermal_hardware_modules = array( 'coretemp' => gettext("Intel Core* CPU on-die thermal sensor"),
- 'amdtemp' => gettext("AMD K8, K10 and K11 CPU on-die thermal sensor"));
+$thermal_hardware_modules = array(
+ 'coretemp' => gettext("Intel Core* CPU on-die thermal sensor"),
+ 'amdtemp' => gettext("AMD K8, K10 and K11 CPU on-die thermal sensor"));
if ($_POST) {
@@ -96,48 +101,57 @@ if ($_POST) {
ob_flush();
flush();
- if (!empty($_POST['crypto_hardware']) && !array_key_exists($_POST['crypto_hardware'], $crypto_modules))
+ if (!empty($_POST['crypto_hardware']) && !array_key_exists($_POST['crypto_hardware'], $crypto_modules)) {
$input_errors[] = gettext("Please select a valid Cryptographic Accelerator.");
+ }
- if (!empty($_POST['thermal_hardware']) && !array_key_exists($_POST['thermal_hardware'], $thermal_hardware_modules))
+ if (!empty($_POST['thermal_hardware']) && !array_key_exists($_POST['thermal_hardware'], $thermal_hardware_modules)) {
$input_errors[] = gettext("Please select a valid Thermal Hardware Sensor.");
+ }
- if (!empty($_POST['use_mfs_tmp_size']) && (!is_numeric($_POST['use_mfs_tmp_size']) || ($_POST['use_mfs_tmp_size'] < 40)))
+ if (!empty($_POST['use_mfs_tmp_size']) && (!is_numeric($_POST['use_mfs_tmp_size']) || ($_POST['use_mfs_tmp_size'] < 40))) {
$input_errors[] = gettext("/tmp Size must be numeric and should not be less than 40MB.");
+ }
- if (!empty($_POST['use_mfs_var_size']) && (!is_numeric($_POST['use_mfs_var_size']) || ($_POST['use_mfs_var_size'] < 60)))
+ if (!empty($_POST['use_mfs_var_size']) && (!is_numeric($_POST['use_mfs_var_size']) || ($_POST['use_mfs_var_size'] < 60))) {
$input_errors[] = gettext("/var Size must be numeric and should not be less than 60MB.");
+ }
if (!$input_errors) {
- if($_POST['harddiskstandby'] <> "") {
+ if ($_POST['harddiskstandby'] <> "") {
$config['system']['harddiskstandby'] = $_POST['harddiskstandby'];
system_set_harddisk_standby();
- } else
+ } else {
unset($config['system']['harddiskstandby']);
+ }
- if($_POST['proxyurl'] <> "")
+ if ($_POST['proxyurl'] <> "") {
$config['system']['proxyurl'] = $_POST['proxyurl'];
- else
+ } else {
unset($config['system']['proxyurl']);
+ }
- if($_POST['proxyport'] <> "")
+ if ($_POST['proxyport'] <> "") {
$config['system']['proxyport'] = $_POST['proxyport'];
- else
+ } else {
unset($config['system']['proxyport']);
+ }
- if($_POST['proxyuser'] <> "")
+ if ($_POST['proxyuser'] <> "") {
$config['system']['proxyuser'] = $_POST['proxyuser'];
- else
+ } else {
unset($config['system']['proxyuser']);
+ }
- if($_POST['proxypass'] <> "")
+ if ($_POST['proxypass'] <> "") {
$config['system']['proxypass'] = $_POST['proxypass'];
- else
+ } else {
unset($config['system']['proxypass']);
+ }
$need_relayd_restart = false;
- if($_POST['lb_use_sticky'] == "yes") {
+ if ($_POST['lb_use_sticky'] == "yes") {
if (!isset($config['system']['lb_use_sticky'])) {
$config['system']['lb_use_sticky'] = true;
$need_relayd_restart = true;
@@ -153,65 +167,76 @@ if ($_POST) {
}
}
- if($_POST['gw_switch_default'] == "yes")
+ if ($_POST['gw_switch_default'] == "yes") {
$config['system']['gw_switch_default'] = true;
- else
+ } else {
unset($config['system']['gw_switch_default']);
+ }
- if($_POST['pkg_nochecksig'] == "yes")
+ if ($_POST['pkg_nochecksig'] == "yes") {
$config['system']['pkg_nochecksig'] = true;
- elseif (isset($config['system']['pkg_nochecksig']))
+ } elseif (isset($config['system']['pkg_nochecksig'])) {
unset($config['system']['pkg_nochecksig']);
+ }
- if($_POST['powerd_enable'] == "yes")
+ if ($_POST['powerd_enable'] == "yes") {
$config['system']['powerd_enable'] = true;
- else
+ } else {
unset($config['system']['powerd_enable']);
+ }
$config['system']['powerd_ac_mode'] = $_POST['powerd_ac_mode'];
$config['system']['powerd_battery_mode'] = $_POST['powerd_battery_mode'];
$config['system']['powerd_normal_mode'] = $_POST['powerd_normal_mode'];
- if($_POST['crypto_hardware'])
+ if ($_POST['crypto_hardware']) {
$config['system']['crypto_hardware'] = $_POST['crypto_hardware'];
- else
+ } else {
unset($config['system']['crypto_hardware']);
+ }
- if($_POST['thermal_hardware'])
+ if ($_POST['thermal_hardware']) {
$config['system']['thermal_hardware'] = $_POST['thermal_hardware'];
- else
+ } else {
unset($config['system']['thermal_hardware']);
+ }
- if($_POST['schedule_states'] == "yes")
+ if ($_POST['schedule_states'] == "yes") {
$config['system']['schedule_states'] = true;
- else
+ } else {
unset($config['system']['schedule_states']);
+ }
- if($_POST['kill_states'] == "yes")
+ if ($_POST['kill_states'] == "yes") {
$config['system']['kill_states'] = true;
- else
+ } else {
unset($config['system']['kill_states']);
+ }
- if($_POST['skip_rules_gw_down'] == "yes")
+ if ($_POST['skip_rules_gw_down'] == "yes") {
$config['system']['skip_rules_gw_down'] = true;
- else
+ } else {
unset($config['system']['skip_rules_gw_down']);
+ }
$need_apinger_restart = false;
- if($_POST['apinger_debug'] == "yes") {
- if (!isset($config['system']['apinger_debug']))
+ if ($_POST['apinger_debug'] == "yes") {
+ if (!isset($config['system']['apinger_debug'])) {
$need_apinger_restart = true;
+ }
$config['system']['apinger_debug'] = true;
} else {
- if (isset($config['system']['apinger_debug']))
+ if (isset($config['system']['apinger_debug'])) {
$need_apinger_restart = true;
+ }
unset($config['system']['apinger_debug']);
}
- if($_POST['use_mfs_tmpvar'] == "yes")
+ if ($_POST['use_mfs_tmpvar'] == "yes") {
$config['system']['use_mfs_tmpvar'] = true;
- else
+ } else {
unset($config['system']['use_mfs_tmpvar']);
+ }
$config['system']['use_mfs_tmp_size'] = $_POST['use_mfs_tmp_size'];
$config['system']['use_mfs_var_size'] = $_POST['use_mfs_var_size'];
@@ -230,22 +255,25 @@ if ($_POST) {
$retval = 0;
system_resolvconf_generate(true);
$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);
+ }
activate_powerd();
load_crypto();
load_thermal_hardware();
- if ($need_relayd_restart)
+ if ($need_relayd_restart) {
relayd_configure();
- if ($need_apinger_restart)
+ }
+ if ($need_apinger_restart) {
setup_gateways_monitor();
+ }
}
}
-$pgtitle = array(gettext("System"),gettext("Advanced: Miscellaneous"));
+$pgtitle = array(gettext("System"), gettext("Advanced: Miscellaneous"));
include("head.inc");
?>
@@ -253,30 +281,33 @@ include("head.inc");
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
<?php
include("fbegin.inc");
- if ($input_errors)
+ if ($input_errors) {
print_input_errors($input_errors);
- if ($savemsg)
+ }
+ if ($savemsg) {
print_info_box($savemsg);
+ }
?>
<script type="text/javascript">
//<![CDATA[
function sticky_checked(obj) {
- if (obj.checked)
- jQuery('#srctrack').attr('disabled',false);
- else
- jQuery('#srctrack').attr('disabled','true');
+ if (obj.checked) {
+ jQuery('#srctrack').attr('disabled', false);
+ } else {
+ jQuery('#srctrack').attr('disabled', 'true');
+ }
}
function tmpvar_checked(obj) {
if (obj.checked) {
- jQuery('#use_mfs_tmp_size').attr('disabled',false);
- jQuery('#use_mfs_var_size').attr('disabled',false);
- jQuery('#rrdbackup').attr('disabled',false);
- jQuery('#dhcpbackup').attr('disabled',false);
+ jQuery('#use_mfs_tmp_size').attr('disabled', false);
+ jQuery('#use_mfs_var_size').attr('disabled', false);
+ jQuery('#rrdbackup').attr('disabled', false);
+ jQuery('#dhcpbackup').attr('disabled', false);
} else {
- jQuery('#use_mfs_tmp_size').attr('disabled','true');
- jQuery('#use_mfs_var_size').attr('disabled','true');
- jQuery('#rrdbackup').attr('disabled','true');
- jQuery('#dhcpbackup').attr('disabled','true');
+ jQuery('#use_mfs_tmp_size').attr('disabled', 'true');
+ jQuery('#use_mfs_var_size').attr('disabled', 'true');
+ jQuery('#rrdbackup').attr('disabled', 'true');
+ jQuery('#dhcpbackup').attr('disabled', 'true');
}
}
//]]>
@@ -353,19 +384,19 @@ function tmpvar_checked(obj) {
<input name="lb_use_sticky" type="checkbox" id="lb_use_sticky" value="yes" <?php if ($pconfig['lb_use_sticky']) echo "checked=\"checked\""; ?> onclick="sticky_checked(this)" />
<strong><?=gettext("Use sticky connections"); ?></strong><br />
<?=gettext("Successive connections will be redirected to the servers " .
- "in a round-robin manner with connections from the same " .
- "source being sent to the same web server. This 'sticky " .
- "connection' will exist as long as there are states that " .
- "refer to this connection. Once the states expire, so will " .
- "the sticky connection. Further connections from that host " .
- "will be redirected to the next web server in the round " .
- "robin. Changing this option will restart the Load Balancing service."); ?>
+ "in a round-robin manner with connections from the same " .
+ "source being sent to the same web server. This 'sticky " .
+ "connection' will exist as long as there are states that " .
+ "refer to this connection. Once the states expire, so will " .
+ "the sticky connection. Further connections from that host " .
+ "will be redirected to the next web server in the round " .
+ "robin. Changing this option will restart the Load Balancing service."); ?>
<br />
<input name="srctrack" id="srctrack" value="<?php if ($pconfig['srctrack'] <> "") echo $pconfig['srctrack']; else "1400"; ?>" class="formfld unknown" <?php if ($pconfig['lb_use_sticky'] == false) echo "disabled=\"disabled\""; ?> />
<br />
<?=gettext("Set the source tracking timeout for sticky connections. " .
- "By default this is 0, so source tracking is removed as soon as the state expires. " .
- "Setting this timeout higher will cause the source/destination relationship to persist for longer periods of time."); ?>
+ "By default this is 0, so source tracking is removed as soon as the state expires. " .
+ "Setting this timeout higher will cause the source/destination relationship to persist for longer periods of time."); ?>
</td>
</tr>
<tr>
@@ -373,8 +404,7 @@ function tmpvar_checked(obj) {
<td width="78%" class="vtable">
<input name="gw_switch_default" type="checkbox" id="gw_switch_default" value="yes" <?php if ($pconfig['gw_switch_default']) echo "checked=\"checked\""; ?> />
<strong><?=gettext("Enable default gateway switching"); ?></strong><br />
- <?=gettext("If the default gateway goes down, " .
- "switch the default gateway to another available one. This is not enabled by default, as it's unnecessary in most all scenarios, which instead use gateway groups."); ?>
+ <?=gettext("If the default gateway goes down, switch the default gateway to another available one. This is not enabled by default, as it's unnecessary in most all scenarios, which instead use gateway groups."); ?>
</td>
</tr>
<tr>
@@ -394,10 +424,10 @@ function tmpvar_checked(obj) {
<td><?=gettext("On AC Power Mode:");?> &nbsp;</td>
<td>
<select name="powerd_ac_mode" id="powerd_ac_mode">
- <option value="hadp"<?php if($pconfig['powerd_ac_mode']=="hadp") echo " selected=\"selected\""; ?>><?=gettext("Hiadaptive");?></option>
- <option value="adp"<?php if($pconfig['powerd_ac_mode']=="adp") echo " selected=\"selected\""; ?>><?=gettext("Adaptive");?></option>
- <option value="min"<?php if($pconfig['powerd_ac_mode']=="min") echo " selected=\"selected\""; ?>><?=gettext("Minimum");?></option>
- <option value="max"<?php if($pconfig['powerd_ac_mode']=="max") echo " selected=\"selected\""; ?>><?=gettext("Maximum");?></option>
+ <option value="hadp"<?php if ($pconfig['powerd_ac_mode'] == "hadp") echo " selected=\"selected\""; ?>><?=gettext("Hiadaptive");?></option>
+ <option value="adp"<?php if ($pconfig['powerd_ac_mode'] == "adp") echo " selected=\"selected\""; ?>><?=gettext("Adaptive");?></option>
+ <option value="min"<?php if ($pconfig['powerd_ac_mode'] == "min") echo " selected=\"selected\""; ?>><?=gettext("Minimum");?></option>
+ <option value="max"<?php if ($pconfig['powerd_ac_mode'] == "max") echo " selected=\"selected\""; ?>><?=gettext("Maximum");?></option>
</select>
</td>
</tr>
@@ -405,10 +435,10 @@ function tmpvar_checked(obj) {
<td><?=gettext("On Battery Power Mode:");?> &nbsp;</td>
<td>
<select name="powerd_battery_mode" id="powerd_battery_mode">
- <option value="hadp"<?php if($pconfig['powerd_battery_mode']=="hadp") echo " selected=\"selected\""; ?>><?=gettext("Hiadaptive");?></option>
- <option value="adp"<?php if($pconfig['powerd_battery_mode']=="adp") echo " selected=\"selected\""; ?>><?=gettext("Adaptive");?></option>
- <option value="min"<?php if($pconfig['powerd_battery_mode']=="min") echo " selected=\"selected\""; ?>><?=gettext("Minimum");?></option>
- <option value="max"<?php if($pconfig['powerd_battery_mode']=="max") echo " selected=\"selected\""; ?>><?=gettext("Maximum");?></option>
+ <option value="hadp"<?php if ($pconfig['powerd_battery_mode'] == "hadp") echo " selected=\"selected\""; ?>><?=gettext("Hiadaptive");?></option>
+ <option value="adp"<?php if ($pconfig['powerd_battery_mode'] == "adp") echo " selected=\"selected\""; ?>><?=gettext("Adaptive");?></option>
+ <option value="min"<?php if ($pconfig['powerd_battery_mode'] == "min") echo " selected=\"selected\""; ?>><?=gettext("Minimum");?></option>
+ <option value="max"<?php if ($pconfig['powerd_battery_mode'] == "max") echo " selected=\"selected\""; ?>><?=gettext("Maximum");?></option>
</select>
</td>
</tr>
@@ -416,28 +446,28 @@ function tmpvar_checked(obj) {
<td><?=gettext("On Unknown Power Mode:");?> &nbsp;</td>
<td>
<select name="powerd_normal_mode" id="powerd_normal_mode">
- <option value="hadp"<?php if($pconfig['powerd_normal_mode']=="hadp") echo " selected=\"selected\""; ?>><?=gettext("Hiadaptive");?></option>
- <option value="adp"<?php if($pconfig['powerd_normal_mode']=="adp") echo " selected=\"selected\""; ?>><?=gettext("Adaptive");?></option>
- <option value="min"<?php if($pconfig['powerd_normal_mode']=="min") echo " selected=\"selected\""; ?>><?=gettext("Minimum");?></option>
- <option value="max"<?php if($pconfig['powerd_normal_mode']=="max") echo " selected=\"selected\""; ?>><?=gettext("Maximum");?></option>
+ <option value="hadp"<?php if ($pconfig['powerd_normal_mode'] == "hadp") echo " selected=\"selected\""; ?>><?=gettext("Hiadaptive");?></option>
+ <option value="adp"<?php if ($pconfig['powerd_normal_mode'] == "adp") echo " selected=\"selected\""; ?>><?=gettext("Adaptive");?></option>
+ <option value="min"<?php if ($pconfig['powerd_normal_mode'] == "min") echo " selected=\"selected\""; ?>><?=gettext("Minimum");?></option>
+ <option value="max"<?php if ($pconfig['powerd_normal_mode'] == "max") echo " selected=\"selected\""; ?>><?=gettext("Maximum");?></option>
</select>
</td>
</tr>
</table>
<br />
<?=gettext("The powerd utility monitors the system state and sets various power control " .
- "options accordingly. It offers four modes (maximum, minimum, adaptive " .
- "and hiadaptive) that can be individually selected while on AC power or batteries. " .
- "The modes maximum, minimum, adaptive and hiadaptive may be abbreviated max, " .
- "min, adp, hadp. Maximum mode chooses the highest performance values. Minimum " .
- "mode selects the lowest performance values to get the most power savings. " .
- "Adaptive mode attempts to strike a balance by degrading performance when " .
- "the system appears idle and increasing it when the system is busy. It " .
- "offers a good balance between a small performance loss for greatly " .
- "increased power savings. Hiadaptive mode is alike adaptive mode, but " .
- "tuned for systems where performance and interactivity are more important " .
- "than power consumption. It raises frequency faster, drops slower and " .
- "keeps twice lower CPU load."); ?>
+ "options accordingly. It offers four modes (maximum, minimum, adaptive " .
+ "and hiadaptive) that can be individually selected while on AC power or batteries. " .
+ "The modes maximum, minimum, adaptive and hiadaptive may be abbreviated max, " .
+ "min, adp, hadp. Maximum mode chooses the highest performance values. Minimum " .
+ "mode selects the lowest performance values to get the most power savings. " .
+ "Adaptive mode attempts to strike a balance by degrading performance when " .
+ "the system appears idle and increasing it when the system is busy. It " .
+ "offers a good balance between a small performance loss for greatly " .
+ "increased power savings. Hiadaptive mode is alike adaptive mode, but " .
+ "tuned for systems where performance and interactivity are more important " .
+ "than power consumption. It raises frequency faster, drops slower and " .
+ "keeps twice lower CPU load."); ?>
</td>
</tr>
<tr>
@@ -465,7 +495,7 @@ function tmpvar_checked(obj) {
"acceleration."); ?>
<br /><br />
<?=gettext("If you do not have a crypto chip in your system, this option will have no " .
- "effect. To unload the selected module, set this option to 'none' and then reboot."); ?>
+ "effect. To unload the selected module, set this option to 'none' and then reboot."); ?>
</td>
</tr>
<tr>
@@ -485,8 +515,8 @@ function tmpvar_checked(obj) {
</select>
<br />
<?=gettext("If you have a supported CPU, selecting a themal sensor will load the appropriate " .
- "driver to read its temperature. Setting this to 'None' will attempt to read the " .
- "temperature from an ACPI-compliant motherboard sensor instead, if one is present."); ?>
+ "driver to read its temperature. Setting this to 'None' will attempt to read the " .
+ "temperature from an ACPI-compliant motherboard sensor instead, if one is present."); ?>
<br /><br />
<?=gettext("If you do not have a supported thermal sensor chip in your system, this option will have no " .
"effect. To unload the selected module, set this option to 'none' and then reboot."); ?>
@@ -516,7 +546,7 @@ function tmpvar_checked(obj) {
<input name="schedule_states" type="checkbox" id="schedule_states" value="yes" <?php if ($pconfig['schedule_states']) echo "checked=\"checked\""; ?> />
<br />
<?=gettext("By default, when a schedule expires, connections permitted by that schedule are killed. ".
- "This option overrides that behavior by not clearing states for existing connections."); ?>
+ "This option overrides that behavior by not clearing states for existing connections."); ?>
</td>
</tr>
<tr>
@@ -539,8 +569,8 @@ function tmpvar_checked(obj) {
<input name="skip_rules_gw_down" type="checkbox" id="skip_rules_gw_down" value="yes" <?php if ($pconfig['skip_rules_gw_down']) echo "checked=\"checked\""; ?> />
<br />
<?=gettext("By default, when a rule has a gateway specified and this gateway is down, ".
- "the rule is created omitting the gateway. This option overrides that behavior by omitting ".
- "the entire rule instead."); ?>
+ "the rule is created omitting the gateway. This option overrides that behavior by omitting ".
+ "the entire rule instead."); ?>
</td>
</tr>
<tr>
@@ -561,7 +591,7 @@ function tmpvar_checked(obj) {
<input name="use_mfs_tmpvar" type="checkbox" id="use_mfs_tmpvar" value="yes" <?php if ($pconfig['use_mfs_tmpvar']) echo "checked=\"checked\""; ?> onclick="tmpvar_checked(this)" />
<strong><?=gettext("Use memory file system for /tmp and /var"); ?></strong><br />
<?=gettext("Set this if you wish to use /tmp and /var as RAM disks (memory file system disks) on a full install " .
- "rather than use the hard disk. Setting this will cause the data in /tmp and /var to be lost at reboot, including log data. RRD and DHCP Leases will be retained."); ?>
+ "rather than use the hard disk. Setting this will cause the data in /tmp and /var to be lost at reboot, including log data. RRD and DHCP Leases will be retained."); ?>
</td>
</tr>
<?php endif; ?>
@@ -571,7 +601,7 @@ function tmpvar_checked(obj) {
<input name="use_mfs_tmp_size" id="use_mfs_tmp_size" value="<?php if ($pconfig['use_mfs_tmp_size'] <> "") echo $pconfig['use_mfs_tmp_size']; ?>" class="formfld unknown" <?php if (($g['platform'] == "pfSense") && ($pconfig['use_mfs_tmpvar'] == false)) echo "disabled=\"disabled\""; ?> /> MB
<br />
<?=gettext("Set the size, in MB, for the /tmp RAM disk. " .
- "Leave blank for 40MB. Do not set lower than 40."); ?>
+ "Leave blank for 40MB. Do not set lower than 40."); ?>
</td>
</tr>
<tr>
@@ -580,7 +610,7 @@ function tmpvar_checked(obj) {
<input name="use_mfs_var_size" id="use_mfs_var_size" value="<?php if ($pconfig['use_mfs_var_size'] <> "") echo $pconfig['use_mfs_var_size']; ?>" class="formfld unknown" <?php if (($g['platform'] == "pfSense") && ($pconfig['use_mfs_tmpvar'] == false)) echo "disabled=\"disabled\""; ?> /> MB
<br />
<?=gettext("Set the size, in MB, for the /var RAM disk. " .
- "Leave blank for 60MB. Do not set lower than 60."); ?>
+ "Leave blank for 60MB. Do not set lower than 60."); ?>
</td>
</tr>
<tr>
@@ -618,7 +648,7 @@ function tmpvar_checked(obj) {
<tr>
<td colspan="2" class="list" height="12">&nbsp;</td>
</tr>
- <?php if($g['platform'] == "pfSenseDISABLED"): ?>
+ <?php if ($g['platform'] == "pfSenseDISABLED"): ?>
<tr>
<td colspan="2" valign="top" class="listtopic"><?=gettext("Hardware Settings"); ?></td>
</tr>
@@ -630,12 +660,12 @@ function tmpvar_checked(obj) {
## Values from ATA-2 http://www.t13.org/project/d0948r3-ATA-2.pdf (Page 66)
$sbvals = explode(" ", "0.5,6 1,12 2,24 3,36 4,48 5,60 7.5,90 10,120 15,180 20,240 30,241 60,242");
?>
- <option value="" <?php if(!$pconfig['harddiskstandby']) echo('selected="selected"');?>><?=gettext("Always on"); ?></option>
+ <option value="" <?php if (!$pconfig['harddiskstandby']) echo('selected="selected"');?>><?=gettext("Always on"); ?></option>
<?php
foreach ($sbvals as $sbval):
- list($min,$val) = explode(",", $sbval);
+ list($min, $val) = explode(",", $sbval);
?>
- <option value="<?=$val;?>" <?php if($pconfig['harddiskstandby'] == $val) echo('selected="selected"');?>><?=$min;?> <?=gettext("minutes"); ?></option>
+ <option value="<?=$val;?>" <?php if ($pconfig['harddiskstandby'] == $val) echo('selected="selected"');?>><?=$min;?> <?=gettext("minutes"); ?></option>
<?php endforeach; ?>
</select>
<br />
OpenPOWER on IntegriCloud