acsconfig boolean writing without quotes
This commit is contained in:
@@ -87,7 +87,7 @@
|
||||
<label class="w3-label">Relay invert</label>
|
||||
<input class="w3-check" type="hidden" name="relayinvert" value="false" >
|
||||
<input class="w3-check" type="checkbox" name="relayinvert" value="true"
|
||||
<?php if($settings['relayinvert'] == "true"){
|
||||
<?php if($settings['relayinvert'] == true){
|
||||
echo "checked";
|
||||
}
|
||||
?>>
|
||||
|
||||
@@ -2,7 +2,11 @@
|
||||
function write_php_ini($array, $file){
|
||||
$res = array();
|
||||
foreach($array as $key => $val){
|
||||
$res[] = "$key=".(is_numeric($val) ? $val : '"'.$val.'"');
|
||||
if($val == "true" || $val == "false"){
|
||||
$res[] = "$key=$val";
|
||||
}else{
|
||||
$res[] = "$key=".(is_numeric($val) ? $val : '"'.$val.'"');
|
||||
}
|
||||
}
|
||||
return safefilerewrite($file, implode("\n", $res));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user