From efc0e29abc068b41f52a2d5d6ac89cb6c4791662 Mon Sep 17 00:00:00 2001 From: jim-p Date: Tue, 12 Mar 2013 13:59:40 -0400 Subject: Move tmp/var init to just after mount of /cf so that the sizing works properly on NanoBSD. Fix input validation for sizes. Add note about needing a reboot to apply the settings. --- usr/local/www/system_advanced_misc.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'usr/local/www') diff --git a/usr/local/www/system_advanced_misc.php b/usr/local/www/system_advanced_misc.php index 92b4069..669097d 100644 --- a/usr/local/www/system_advanced_misc.php +++ b/usr/local/www/system_advanced_misc.php @@ -101,11 +101,11 @@ if ($_POST) { 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)) - $input_errors[] = gettext("/tmp Size should not be less than 40MB."); + 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)) - $input_errors[] = gettext("/var Size should not be less than 60MB."); + 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) { @@ -565,7 +565,7 @@ function tmpvar_checked(obj) { - + -- cgit v1.1