mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-28 23:59:57 +09:00
issue 566, fix problem about install using install config
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9692 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
59b7ce4d96
commit
ff22c78305
2 changed files with 34 additions and 4 deletions
|
|
@ -159,8 +159,17 @@
|
||||||
$logged_info->is_admin = 'Y';
|
$logged_info->is_admin = 'Y';
|
||||||
Context::set('logged_info', $logged_info);
|
Context::set('logged_info', $logged_info);
|
||||||
|
|
||||||
include $this->db_tmp_config_file;
|
// check install config
|
||||||
include $this->etc_tmp_config_file;
|
if (Context::get('install_config'))
|
||||||
|
{
|
||||||
|
$db_info = $this->_makeDbInfoByInstallConfig();
|
||||||
|
}
|
||||||
|
|
||||||
|
// install by default XE UI
|
||||||
|
else{
|
||||||
|
include $this->db_tmp_config_file;
|
||||||
|
include $this->etc_tmp_config_file;
|
||||||
|
}
|
||||||
|
|
||||||
// Set DB type and information
|
// Set DB type and information
|
||||||
Context::setDBInfo($db_info);
|
Context::setDBInfo($db_info);
|
||||||
|
|
@ -196,6 +205,26 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Make DB Information by Install Config
|
||||||
|
**/
|
||||||
|
function _makeDbInfoByInstallConfig()
|
||||||
|
{
|
||||||
|
$db_info->master_db['db_type'] = Context::get('db_type');
|
||||||
|
$db_info->master_db['db_port'] = Context::get('db_port');
|
||||||
|
$db_info->master_db['db_hostname'] = Context::get('db_hostname');
|
||||||
|
$db_info->master_db['db_userid'] = Context::get('db_userid');
|
||||||
|
$db_info->master_db['db_password'] = Context::get('db_password');
|
||||||
|
$db_info->master_db['db_database'] = Context::get('db_database');
|
||||||
|
$db_info->master_db['db_table_prefix'] = Context::get('db_table_prefix');
|
||||||
|
$db_info->slave_db = array($db_info->master_db);
|
||||||
|
$db_info->default_url = Context::getRequestUri();
|
||||||
|
$db_info->lang_type = Context::getLangType();
|
||||||
|
$db_info->use_rewrite = Context::get('use_rewrite');
|
||||||
|
$db_info->time_zone = Context::get('time_zone');
|
||||||
|
return $db_info;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Set FTP Information
|
* @brief Set FTP Information
|
||||||
**/
|
**/
|
||||||
|
|
@ -422,7 +451,6 @@
|
||||||
unset($oModule);
|
unset($oModule);
|
||||||
$oModule = &getClass($module);
|
$oModule = &getClass($module);
|
||||||
if(method_exists($oModule, 'moduleInstall')) $oModule->moduleInstall();
|
if(method_exists($oModule, 'moduleInstall')) $oModule->moduleInstall();
|
||||||
|
|
||||||
return new Object();
|
return new Object();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -34,8 +34,10 @@
|
||||||
if(is_array($install_config)){
|
if(is_array($install_config)){
|
||||||
foreach($install_config as $k => $v) Context::set($k,$v,true);
|
foreach($install_config as $k => $v) Context::set($k,$v,true);
|
||||||
unset($GLOBALS['__DB__']);
|
unset($GLOBALS['__DB__']);
|
||||||
|
Context::set('install_config', true, true);
|
||||||
$oInstallController = &getController('install');
|
$oInstallController = &getController('install');
|
||||||
$oInstallController->procInstall();
|
$output = $oInstallController->procInstall();
|
||||||
|
if (!$output->toBool()) return $output;
|
||||||
header("location: ./");
|
header("location: ./");
|
||||||
Context::close();
|
Context::close();
|
||||||
exit;
|
exit;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue