diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-04-23 07:31:40 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-04-23 07:31:40 +0000 |
commit | 37607a70f493921c93a50f7d245568a9e8d34d63 (patch) | |
tree | e1a8bf727874e14c6200ccfff218c0cfe88f4d8e /admin/system.php | |
parent | a31560aec4f004e58930277758f5412d86c62adc (diff) | |
download | ampache-37607a70f493921c93a50f7d245568a9e8d34d63.tar.gz ampache-37607a70f493921c93a50f7d245568a9e8d34d63.tar.bz2 ampache-37607a70f493921c93a50f7d245568a9e8d34d63.zip |
updated system page, with new config writing code, not working...
Diffstat (limited to 'admin/system.php')
-rw-r--r-- | admin/system.php | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/admin/system.php b/admin/system.php index 4bfdcbe5..82e56476 100644 --- a/admin/system.php +++ b/admin/system.php @@ -66,27 +66,38 @@ 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 elseif (isset($array_value[$key])) { $line = ''; } - + + if (substr($line,0,1) == "#") { + $line = ltrim($line,"#"); + $line = ";" . $line; + } } // if key - + else { + // Replace # with ; + $line = str_replace("#",";",$line); + } $final .= $line . "\n"; |