mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-10 20:44:28 +09:00
Do not leave out any custom configuration
This commit is contained in:
parent
a80468fc25
commit
3b641c1774
3 changed files with 23 additions and 0 deletions
|
|
@ -519,6 +519,13 @@ class Context
|
||||||
$db_info->use_prepared_statements = $config['use_prepared_statements'] ? 'Y' : 'N';
|
$db_info->use_prepared_statements = $config['use_prepared_statements'] ? 'Y' : 'N';
|
||||||
$db_info->use_rewrite = $config['use_rewrite'] ? 'Y' : 'N';
|
$db_info->use_rewrite = $config['use_rewrite'] ? 'Y' : 'N';
|
||||||
$db_info->use_sso = $config['use_sso'] ? 'Y' : 'N';
|
$db_info->use_sso = $config['use_sso'] ? 'Y' : 'N';
|
||||||
|
if (is_array($config['other']))
|
||||||
|
{
|
||||||
|
foreach ($config['other'] as $key => $value)
|
||||||
|
{
|
||||||
|
$db_info->{$key} = $value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Save old format to Context instance.
|
// Save old format to Context instance.
|
||||||
self::$_instance->allow_rewrite = $config['use_rewrite'];
|
self::$_instance->allow_rewrite = $config['use_rewrite'];
|
||||||
|
|
|
||||||
|
|
@ -104,4 +104,5 @@ return array(
|
||||||
'use_prepared_statements' => true,
|
'use_prepared_statements' => true,
|
||||||
'use_rewrite' => true,
|
'use_rewrite' => true,
|
||||||
'use_sso' => false,
|
'use_sso' => false,
|
||||||
|
'other' => array(),
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -349,6 +349,21 @@ class Config
|
||||||
$config['use_rewrite'] = $db_info->use_rewrite === 'Y' ? true : false;
|
$config['use_rewrite'] = $db_info->use_rewrite === 'Y' ? true : false;
|
||||||
$config['use_sso'] = $db_info->use_sso === 'Y' ? true : false;
|
$config['use_sso'] = $db_info->use_sso === 'Y' ? true : false;
|
||||||
|
|
||||||
|
// Copy other configuration.
|
||||||
|
unset($db_info->master_db, $db_info->slave_db);
|
||||||
|
unset($db_info->lang_type, $db_info->time_zone);
|
||||||
|
unset($db_info->default_url, $db_info->http_port, $db_info->https_port, $db_info->use_ssl);
|
||||||
|
unset($db_info->delay_session, $db_info->use_db_session);
|
||||||
|
unset($db_info->minify_scripts, $db_info->admin_ip_list);
|
||||||
|
unset($db_info->use_sitelock, $db_info->sitelock_title, $db_info->sitelock_message, $db_info->sitelock_whitelist);
|
||||||
|
unset($db_info->embed_white_iframe, $db_info->embed_white_object);
|
||||||
|
unset($db_info->use_object_cache, $db_info->use_mobile_view, $db_info->use_prepared_statements);
|
||||||
|
unset($db_info->use_rewrite, $db_info->use_sso);
|
||||||
|
foreach ($db_info as $key => $value)
|
||||||
|
{
|
||||||
|
$config['other'][$key] = $value;
|
||||||
|
}
|
||||||
|
|
||||||
// Return the new configuration.
|
// Return the new configuration.
|
||||||
return $config;
|
return $config;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue