[TASK] update composer

This commit is contained in:
Kanti 2015-03-30 19:06:21 +02:00
commit a685bcf91b
116 changed files with 4837 additions and 8167 deletions

View file

@ -52,18 +52,19 @@ function config($key, $value = null)
$_config[$key] = $value;
}
function save_config($data = array(),$new = array()){
function save_config($data = array(), $new = array())
{
global $config_file;
$string = file_get_contents($config_file) . "\n";
foreach ($data as $word => $value) {
$value = str_replace('"','\"',$value);
$value = str_replace('"', '\"', $value);
$string = preg_replace("/^" . $word . " = .+$/m", $word . ' = "' . $value . '"', $string);
}
$string = rtrim($string);
foreach ($new as $word => $value) {
$value = str_replace('"','\"',$value);
$value = str_replace('"', '\"', $value);
$string .= "\n" . $word . ' = "' . $value . '"' . "\n";
}
$string = rtrim($string);