mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +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
|
|
@ -487,11 +487,14 @@ class Context
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
public static function loadDBInfo()
|
||||
public static function loadDBInfo($config = null)
|
||||
{
|
||||
// Load new configuration format.
|
||||
$config = Rhymix\Framework\Config::init();
|
||||
if(!count($config))
|
||||
if ($config === null)
|
||||
{
|
||||
$config = Rhymix\Framework\Config::init();
|
||||
}
|
||||
if (!count($config))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
@ -620,9 +623,16 @@ class Context
|
|||
{
|
||||
$supported = Rhymix\Framework\Lang::getSupportedList();
|
||||
$selected = Rhymix\Framework\Config::get('locale.enabled_lang');
|
||||
foreach ($selected as $lang)
|
||||
if ($selected)
|
||||
{
|
||||
$lang_selected[$lang] = $supported[$lang];
|
||||
foreach ($selected as $lang)
|
||||
{
|
||||
$lang_selected[$lang] = $supported[$lang];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$lang_selected = $supported;
|
||||
}
|
||||
}
|
||||
return $lang_selected;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue