diff --git a/install/include/AirtimeIni.php b/install/include/AirtimeIni.php index 8a5071392..33e7f772e 100644 --- a/install/include/AirtimeIni.php +++ b/install/include/AirtimeIni.php @@ -1,4 +1,10 @@ strlen($property)) - if ($property == substr($lines[$i], 0, strlen($property))){ - $lines[$i] = "$property = $value\n"; + if (strlen($lines[$i]) > strlen($p_property)) + if ($p_property == substr($lines[$i], 0, strlen($p_property))){ + $lines[$i] = "$p_property = $p_value\n"; } } - $fp=fopen($filename, 'w'); + $fp=fopen($p_filename, 'w'); for($i=0; $i<$n; $i++){ fwrite($fp, $lines[$i]); } fclose($fp); } + /** + * After the configuration files have been copied to /etc/airtime, + * this function will update them to values unique to this + * particular installation. + */ static function UpdateIniFiles() { $api_key = AirtimeIni::GenerateRandomString();