mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 03:01:43 +09:00
#905 install using config/install.config.php
This commit is contained in:
parent
49daa9d95d
commit
565614696f
2 changed files with 30 additions and 2 deletions
|
|
@ -35,6 +35,26 @@ class installView extends install
|
|||
$install_config_file = FileHandler::getRealPath('./config/install.config.php');
|
||||
if(file_exists($install_config_file))
|
||||
{
|
||||
/**
|
||||
* If './config/install.config.php' file created and write array shown in the example below, XE installed using config file.
|
||||
* ex )
|
||||
$install_config = array(
|
||||
'db_type' =>'mysqli_innodb',
|
||||
'db_port' =>'3306',
|
||||
'db_hostname' =>'localhost',
|
||||
'db_userid' =>'root',
|
||||
'db_password' =>'root',
|
||||
'db_database' =>'xe_database',
|
||||
'db_table_prefix' =>'xe',
|
||||
'user_rewrite' =>'N',
|
||||
'time_zone' =>'0000',
|
||||
'email_address' =>'admin@xe.com',
|
||||
'password' =>'pass',
|
||||
'password2' =>'pass',
|
||||
'nick_name' =>'admin',
|
||||
'user_id' =>'admin',
|
||||
);
|
||||
*/
|
||||
include $install_config_file;
|
||||
if(is_array($install_config))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
// ko/en/...
|
||||
$lang = Context::getLangType();
|
||||
$logged_info = Context::get('logged_info');
|
||||
|
||||
// insertMenu
|
||||
$oMenuAdminController = getAdminController('menu'); /* @var $oMenuAdminController menuAdminController */
|
||||
|
|
@ -114,20 +115,27 @@ $oDocumentModel = getModel('document'); /* @var $oDocumentModel documentModel */
|
|||
$oDocumentController = getController('document'); /* @var $oDocumentController documentController */
|
||||
|
||||
$obj = new stdClass;
|
||||
|
||||
$obj->member_srl = $logged_info->member_srl;
|
||||
$obj->user_id = htmlspecialchars_decode($logged_info->user_id);
|
||||
$obj->user_name = htmlspecialchars_decode($logged_info->user_name);
|
||||
$obj->nick_name = htmlspecialchars_decode($logged_info->nick_name);
|
||||
$obj->email_address = $logged_info->email_address;
|
||||
|
||||
$obj->module_srl = $module_srl;
|
||||
Context::set('version', __XE_VERSION__);
|
||||
$obj->title = 'Welcome XE';
|
||||
|
||||
$obj->content = $oTemplateHandler->compile(_XE_PATH_ . 'modules/install/script/welcome_content', 'welcome_content_'.$lang);
|
||||
|
||||
$output = $oDocumentController->insertDocument($obj);
|
||||
$output = $oDocumentController->insertDocument($obj, true);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$document_srl = $output->get('document_srl');
|
||||
|
||||
unset($obj->document_srl);
|
||||
$obj->title = 'Welcome mobile XE';
|
||||
$output = $oDocumentController->insertDocument($obj);
|
||||
$output = $oDocumentController->insertDocument($obj, true);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
// save PageWidget
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue