Project

General

Profile

« Previous | Next » 

Revision 60ce86ea

Added by Erik Fonnesbeck about 15 years ago

For settings that exist in the configuration but are blank, only consider it true when associated with a checkbox.

View differences:

usr/local/www/wizard.php
365 365
					$arraynum = "[" . $field['arraynum'] . "]";
366 366
				foreach ($field_split as $f)
367 367
					$field_conv .= "['" . $f . "']";
368
				$toeval = "if (isset(\$config" . $field_conv . $arraynum . ")) { \$value = \$config" . $field_conv . $arraynum . "; if (empty(\$value)) \$value = true; }";
368
				if($field['type'] == "checkbox")
369
					$toeval = "if (isset(\$config" . $field_conv . $arraynum . ")) { \$value = \$config" . $field_conv . $arraynum . "; if (empty(\$value)) \$value = true; }";
370
				else
371
					$toeval = "if (isset(\$config" . $field_conv . $arraynum . ")) \$value = \$config" . $field_conv . $arraynum . ";";
369 372
				eval($toeval);
370 373
		    }
371 374

  

Also available in: Unified diff