1
0
Fork 0
mirror of https://github.com/Yetangitu/ampache synced 2025-10-05 10:49:37 +02:00

updated system page, with new config writing code, not working...

This commit is contained in:
Karl 'vollmerk' Vollmer 2007-04-23 07:31:40 +00:00
parent a31560aec4
commit 37607a70f4

View file

@ -66,17 +66,21 @@ switch ($action) {
/* Check to see if Key on source side is an array */
if (is_array($current[$key])) {
/* We need to add all values of this key to the new config file */
$line = '';
$line = $key . ' = "';
$array_value[$key] = true;
foreach ($current[$key] as $sub_value) {
$line .= $key . " = \"" . $sub_value . "\"\n";
$line .= "$sub_value,";
}
$line = rtrim($line,',');
$line .= '"';
unset($current[$key]);
} // is array
/* Put in the current value */
elseif (isset($current[$key]) AND $key != 'config_version') {
$line = $key . " = \"" . $current[$key] . "\"";
$line = $key . ' = "' . $current[$key] . '"';
unset($current[$key]);
} // if set
@ -84,9 +88,16 @@ switch ($action) {
$line = '';
}
if (substr($line,0,1) == "#") {
$line = ltrim($line,"#");
$line = ";" . $line;
}
} // if key
else {
// Replace # with ;
$line = str_replace("#",";",$line);
}
$final .= $line . "\n";