Workaround for comment character conflict between python ConfigObj and PHP
This commit is contained in:
parent
04a1d82172
commit
75306936c0
3 changed files with 18 additions and 12 deletions
|
@ -40,7 +40,13 @@ abstract class Setup {
|
|||
$inSection = false;
|
||||
}
|
||||
|
||||
if ($inSection) {
|
||||
if (substr(trim($line), 0, 1) == "#") {
|
||||
/* Workaround to strip comments from airtime.conf.
|
||||
* We need to do this because python's ConfigObj and PHP
|
||||
* have different (and equally strict) rules about comment
|
||||
* characters in configuration files.
|
||||
*/
|
||||
} else if ($inSection) {
|
||||
$key = trim(@substr($line, 0, strpos($line, "=")));
|
||||
$fileOutput .= $key && isset($properties[$key]) ? $key . " = " . $properties[$key] . "\n" : $line;
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue