Permit flags in the config

This commit is contained in:
Joe Haig 2016-06-19 23:23:03 +01:00
parent 443c75390a
commit d431c3f767

View file

@ -21,9 +21,10 @@ function GetDistString( $input,$string,$offset,$separator ) {
function ParseConfig( $arrConfig ) {
$config = array();
foreach( $arrConfig as $line ) {
if( $line[0] != "#" ) {
$line = trim($line);
if( $line != "" && $line[0] != "#" ) {
$arrLine = explode( "=",$line );
$config[$arrLine[0]] = $arrLine[1];
$config[$arrLine[0]] = ( count($arrLine) > 1 ? $arrLine[1] : true );
}
}
return $config;