mirror of
https://github.com/Yetangitu/ampache
synced 2025-10-05 02:39:47 +02:00
updated system page, with new config writing code, not working...
This commit is contained in:
parent
a31560aec4
commit
37607a70f4
1 changed files with 16 additions and 5 deletions
|
@ -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";
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue