protected function update_config($new_config, $config_file = '') {
!is_file($config_file) && $config_file = CONF_PATH . '/config.php';
if (is_writable($config_file)) {
$config = require $config_file;
$config = array_merge($config, $new_config);
file_put_contents($config_file, "<?php \nreturn " . stripslashes(var_export($config, true)) . ";", LOCK_EX);
@unlink(RUNTIME_FILE);
return true;
} else {
return false;
}
}