mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 11:44:10 +09:00
Update installer to use new config format
This commit is contained in:
parent
28af7b95cf
commit
0b1fa79f43
15 changed files with 287 additions and 424 deletions
|
|
@ -43,6 +43,16 @@ class Config
|
|||
return self::$_config;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get default system configuration.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getDefaults()
|
||||
{
|
||||
return (include RX_BASEDIR . 'common/defaults/config.php');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a system configuration value.
|
||||
*
|
||||
|
|
@ -332,15 +342,13 @@ class Config
|
|||
/**
|
||||
* Save the current system configuration.
|
||||
*
|
||||
* @param array $config (optional)
|
||||
* @return bool
|
||||
*/
|
||||
public static function save()
|
||||
public static function save($config = null)
|
||||
{
|
||||
if (!count(self::$_config))
|
||||
{
|
||||
self::init();
|
||||
}
|
||||
$buff = '<?php' . "\n" . '// Rhymix System Configuration' . "\n" . 'return ' . self::serialize(self::$_config) . ';' . "\n";
|
||||
$config = ($config === null) ? self::$_config : $config;
|
||||
$buff = '<?php' . "\n" . '// Rhymix System Configuration' . "\n" . 'return ' . self::serialize($config) . ';' . "\n";
|
||||
return \FileHandler::writeFile(RX_BASEDIR . 'files/config/config.php', $buff) ? true : false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue