mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-11 23:01:41 +09:00
Automatically create old config file if it does not exist
This commit is contained in:
parent
3b641c1774
commit
ede85adf24
2 changed files with 7 additions and 2 deletions
|
|
@ -530,6 +530,11 @@ class Context
|
|||
// Save old format to Context instance.
|
||||
self::$_instance->allow_rewrite = $config['use_rewrite'];
|
||||
self::$_instance->db_info = $db_info;
|
||||
if (!file_exists($old_config_file = self::getConfigFile()))
|
||||
{
|
||||
$buff = '<?php' . "\n" . '$db_info = ' . Rhymix\Framework\Config::serialize($db_info) . ';' . "\n";
|
||||
FileHandler::writeFile($old_config_file, $buff);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue