mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-03 17:22:20 +09:00
english comments added
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0_english@8278 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
693e215bc1
commit
4d272994dd
219 changed files with 6407 additions and 8705 deletions
|
|
@ -2,20 +2,20 @@
|
|||
/**
|
||||
* @class installAdminController
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief install module의 admin controller class
|
||||
* @brief admin controller class of the install module
|
||||
**/
|
||||
|
||||
class installAdminController extends install {
|
||||
|
||||
|
||||
/**
|
||||
* @brief 초기화
|
||||
* @brief Initialization
|
||||
**/
|
||||
function init() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 모듈 설치
|
||||
* @brief Install the module
|
||||
**/
|
||||
function procInstallAdminInstall() {
|
||||
$module_name = Context::get('module_name');
|
||||
|
|
@ -28,7 +28,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 모듈 업데이트
|
||||
* @brief Upate the module
|
||||
**/
|
||||
function procInstallAdminUpdate() {
|
||||
$module_name = Context::get('module_name');
|
||||
|
|
@ -42,7 +42,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 설정 변경
|
||||
* @brief Change settings
|
||||
**/
|
||||
function procInstallAdminSaveTimeZone() {
|
||||
$use_rewrite = Context::get('use_rewrite');
|
||||
|
|
@ -101,7 +101,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 지원 언어 선택
|
||||
* @brief Supported languages
|
||||
**/
|
||||
function procInstallAdminSaveLangSelected() {
|
||||
$selected_lang = trim(Context::get('selected_lang'));
|
||||
|
|
|
|||
|
|
@ -2,34 +2,34 @@
|
|||
/**
|
||||
* @class install
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief install module의 high class
|
||||
* @brief install module of the high class
|
||||
**/
|
||||
|
||||
class install extends ModuleObject {
|
||||
|
||||
/**
|
||||
* @brief 설치시 추가 작업이 필요할시 구현
|
||||
* @brief Implement if additional tasks are necessary when installing
|
||||
**/
|
||||
function moduleInstall() {
|
||||
return new Object();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 설치가 이상이 없는지 체크하는 method
|
||||
* @brief a method to check if successfully installed
|
||||
**/
|
||||
function checkUpdate() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 업데이트 실행
|
||||
* @brief Execute update
|
||||
**/
|
||||
function moduleUpdate() {
|
||||
return new Object();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 캐시 파일 재생성
|
||||
* @brief Re-generate the cache file
|
||||
**/
|
||||
function recompileCache() {
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,58 +2,50 @@
|
|||
/**
|
||||
* @class installController
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief install module의 Controller class
|
||||
* @brief install module of the Controller class
|
||||
**/
|
||||
|
||||
class installController extends install {
|
||||
|
||||
/**
|
||||
* @brief 초기화
|
||||
* @brief Initialization
|
||||
**/
|
||||
function init() {
|
||||
// 설치가 되어 있으면 오류
|
||||
// Error occurs if already installed
|
||||
if(Context::isInstalled()) {
|
||||
return new Object(-1, 'msg_already_installed');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 입력받은 정보로 설치를 함
|
||||
* @brief Install with received information
|
||||
**/
|
||||
function procInstall() {
|
||||
// 설치가 되어 있는지에 대한 체크
|
||||
// Check if it is already installed
|
||||
if(Context::isInstalled()) return new Object(-1, 'msg_already_installed');
|
||||
|
||||
// 설치시 임시로 최고관리자로 지정
|
||||
// Assign a temporary administrator when installing
|
||||
$logged_info->is_admin = 'Y';
|
||||
$_SESSION['logged_info'] = $logged_info;
|
||||
Context::set('logged_info', $logged_info);
|
||||
|
||||
// DB와 관련된 변수를 받음
|
||||
// Get DB-related variables
|
||||
$db_info = Context::gets('db_type','db_port','db_hostname','db_userid','db_password','db_database','db_table_prefix','time_zone','use_rewrite');
|
||||
if($db_info->use_rewrite!='Y') $db_info->use_rewrite = 'N';
|
||||
if(!$db_info->default_url) $db_info->default_url = Context::getRequestUri();
|
||||
$db_info->lang_type = Context::getLangType();
|
||||
|
||||
// DB의 타입과 정보를 등록
|
||||
// Set DB type and information
|
||||
Context::setDBInfo($db_info);
|
||||
|
||||
// DB Instance 생성
|
||||
// Create DB Instance
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
// DB접속이 가능한지 체크
|
||||
// Check if available to connect to the DB
|
||||
$output = $oDB->getError();
|
||||
if(!$oDB->isConnected()) return $oDB->getError();
|
||||
|
||||
// firebird는 설치시에 트랜젝션을 사용하지 않음
|
||||
// When installing firebire DB, transaction will not be used
|
||||
if($db_info->db_type != "firebird") $oDB->begin();
|
||||
|
||||
// 모든 모듈의 설치
|
||||
// Install all the modules
|
||||
$this->installDownloadedModule();
|
||||
|
||||
if($db_info->db_type != "firebird") $oDB->commit();
|
||||
|
||||
// config 파일 생성
|
||||
// Create a config file
|
||||
if(!$this->makeConfigFile()) return new Object(-1, 'msg_install_failed');
|
||||
|
||||
// load script
|
||||
|
|
@ -65,12 +57,12 @@
|
|||
}
|
||||
}
|
||||
|
||||
// 설치 완료 메세지 출력
|
||||
// Display a message that installation is completed
|
||||
$this->setMessage('msg_install_completed');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief FTP 정보 등록
|
||||
* @brief Set FTP Information
|
||||
**/
|
||||
function procInstallFTP() {
|
||||
if(Context::isInstalled()) return new Object(-1, 'msg_already_installed');
|
||||
|
|
@ -85,8 +77,7 @@
|
|||
$buff .= sprintf("\$ftp_info->%s = '%s';\n", $key, str_replace("'","\\'",$val));
|
||||
}
|
||||
$buff .= "?>";
|
||||
|
||||
// safe_mode 일 경우
|
||||
// If safe_mode
|
||||
if(ini_get('safe_mode')) {
|
||||
if(!$ftp_info->ftp_user || !$ftp_info->ftp_password) return new Object(-1,'msg_safe_mode_ftp_needed');
|
||||
|
||||
|
|
@ -160,40 +151,33 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 인스톨 환경을 체크하여 결과 return
|
||||
* @brief Result returned after checking the installation environment
|
||||
**/
|
||||
function checkInstallEnv() {
|
||||
// 각 필요한 항목 체크
|
||||
// Check each item
|
||||
$checklist = array();
|
||||
|
||||
// 0. php 버전 체크 (5.2.2는 설치 불가)
|
||||
// 0. check your version of php (5.2.2 is not supported)
|
||||
if(phpversion()=='5.2.2') $checklist['php_version'] = false;
|
||||
else $checklist['php_version'] = true;
|
||||
|
||||
// 1. permission 체크
|
||||
// 1. Check permission
|
||||
if(is_writable('./')||is_writable('./files')) $checklist['permission'] = true;
|
||||
else $checklist['permission'] = false;
|
||||
|
||||
// 2. xml_parser_create함수 유무 체크
|
||||
// 2. Check if xml_parser_create exists
|
||||
if(function_exists('xml_parser_create')) $checklist['xml'] = true;
|
||||
else $checklist['xml'] = false;
|
||||
|
||||
// 3. ini_get(session.auto_start)==1 체크
|
||||
// 3. Check if ini_get (session.auto_start) == 1
|
||||
if(ini_get(session.auto_start)!=1) $checklist['session'] = true;
|
||||
else $checklist['session'] = false;
|
||||
|
||||
// 4. iconv 체크
|
||||
// 4. Check if iconv exists
|
||||
if(function_exists('iconv')) $checklist['iconv'] = true;
|
||||
else $checklist['iconv'] = false;
|
||||
|
||||
// 5. gd 체크 (imagecreatefromgif함수)
|
||||
// 5. Check gd(imagecreatefromgif function)
|
||||
if(function_exists('imagecreatefromgif')) $checklist['gd'] = true;
|
||||
else $checklist['gd'] = false;
|
||||
|
||||
if(!$checklist['php_version'] || !$checklist['permission'] || !$checklist['xml'] || !$checklist['session']) $install_enable = false;
|
||||
else $install_enable = true;
|
||||
|
||||
// 체크 결과를 Context에 저장
|
||||
// Save the checked result to the Context
|
||||
Context::set('checklist', $checklist);
|
||||
Context::set('install_enable', $install_enable);
|
||||
|
||||
|
|
@ -201,8 +185,8 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief files 및 하위 디렉토리 생성
|
||||
* DB 정보를 바탕으로 실제 install하기 전에 로컬 환경 설저d
|
||||
* @brief Create files and subdirectories
|
||||
* Local evironment setting before installation by using DB information
|
||||
**/
|
||||
function makeDefaultDirectory() {
|
||||
$directory_list = array(
|
||||
|
|
@ -218,17 +202,16 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 모든 모듈의 설치
|
||||
* @brief Install all the modules
|
||||
*
|
||||
* 모든 module의 schemas 디렉토리를 확인하여 schema xml을 이용, 테이블 생성
|
||||
* Create a table by using schema xml file in the shcema directory of each module
|
||||
**/
|
||||
function installDownloadedModule() {
|
||||
$oModuleModel = &getModel('module');
|
||||
|
||||
// 각 모듈의 schemas/*.xml 파일을 모두 찾아서 table 생성
|
||||
// Create a table ny finding schemas/*.xml file in each module
|
||||
$module_list = FileHandler::readDir('./modules/', NULL, false, true);
|
||||
foreach($module_list as $module_path) {
|
||||
// 모듈 이름을 구함
|
||||
// Get module name
|
||||
$tmp_arr = explode('/',$module_path);
|
||||
$module = $tmp_arr[count($tmp_arr)-1];
|
||||
|
||||
|
|
@ -236,15 +219,13 @@
|
|||
if(!$xml_info) continue;
|
||||
$modules[$xml_info->category][] = $module;
|
||||
}
|
||||
|
||||
// module 모듈은 미리 설치
|
||||
// Install "module" module in advance
|
||||
$this->installModule('module','./modules/module');
|
||||
$oModule = &getClass('module');
|
||||
if($oModule->checkUpdate()) $oModule->moduleUpdate();
|
||||
|
||||
// 모듈을 category에 의거 설치 순서를 정함
|
||||
// Determine the order of module installation depending on category
|
||||
$install_step = array('system','content','member');
|
||||
// 나머지 모든 모듈 설치
|
||||
// Install all the remaining modules
|
||||
foreach($install_step as $category) {
|
||||
if(count($modules[$category])) {
|
||||
foreach($modules[$category] as $module) {
|
||||
|
|
@ -257,8 +238,7 @@
|
|||
unset($modules[$category]);
|
||||
}
|
||||
}
|
||||
|
||||
// 나머지 모든 모듈 설치
|
||||
// Install all the remaining modules
|
||||
if(count($modules)) {
|
||||
foreach($modules as $category => $module_list) {
|
||||
if(count($module_list)) {
|
||||
|
|
@ -280,13 +260,12 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 개별 모듈의 설치
|
||||
* @brief Install an each module
|
||||
**/
|
||||
function installModule($module, $module_path) {
|
||||
// db instance생성
|
||||
// create db instance
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
// 해당 모듈의 schemas 디렉토리를 검사하여 schema xml파일이 있으면 생성
|
||||
// Create a table if the schema xml exists in the "schemas" directory of the module
|
||||
$schema_dir = sprintf('%s/schemas/', $module_path);
|
||||
$schema_files = FileHandler::readDir($schema_dir, NULL, false, true);
|
||||
|
||||
|
|
@ -296,8 +275,7 @@
|
|||
if(!$file || substr($file,-4)!='.xml') continue;
|
||||
$output = $oDB->createTableByXmlFile($file);
|
||||
}
|
||||
|
||||
// 테이블 설치후 module instance를 만들고 install() method를 실행
|
||||
// Create a table and module instance and then execute install() method
|
||||
unset($oModule);
|
||||
$oModule = &getClass($module);
|
||||
if(method_exists($oModule, 'moduleInstall')) $oModule->moduleInstall();
|
||||
|
|
@ -306,8 +284,8 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief config 파일을 생성
|
||||
* 모든 설정이 이상없이 끝난 후에 config파일 생성
|
||||
* @brief Create config file
|
||||
* Create the config file when all settings are completed
|
||||
**/
|
||||
function makeConfigFile() {
|
||||
$config_file = Context::getConfigFile();
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* @class installView
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief install module의 View class
|
||||
* @brief View class of install module
|
||||
**/
|
||||
|
||||
class installView extends install {
|
||||
|
|
@ -10,25 +10,22 @@
|
|||
var $install_enable = false;
|
||||
|
||||
/**
|
||||
* @brief 초기화
|
||||
* @brief Initialization
|
||||
**/
|
||||
function init() {
|
||||
// template 경로를 지정
|
||||
// Specify the template path
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
|
||||
// 설치가 되어 있으면 오류
|
||||
// Error occurs if already installed
|
||||
if(Context::isInstalled()) return $this->stop('msg_already_installed');
|
||||
|
||||
// 컨트롤러 생성
|
||||
// Install a controller
|
||||
$oInstallController = &getController('install');
|
||||
$this->install_enable = $oInstallController->checkInstallEnv();
|
||||
|
||||
// 설치 가능한 환경이라면 installController::makeDefaultDirectory() 실행
|
||||
// If the environment is installable, execute installController::makeDefaultDirectory()
|
||||
if($this->install_enable) $oInstallController->makeDefaultDirectory();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief license 메세지 노출
|
||||
* @brief Display license messages
|
||||
**/
|
||||
function dispInstallIntroduce() {
|
||||
$install_config_file = FileHandler::getRealPath('./config/install.config.php');
|
||||
|
|
@ -48,7 +45,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 설치 환경에 대한 메세지 보여줌
|
||||
* @brief Display messages about installation environment
|
||||
**/
|
||||
function dispInstallCheckEnv() {
|
||||
$this->setTemplateFile('check_env');
|
||||
|
|
@ -56,13 +53,12 @@
|
|||
|
||||
|
||||
/**
|
||||
* @brief DB 선택 화면
|
||||
* @brief Choose a DB
|
||||
**/
|
||||
function dispInstallSelectDB() {
|
||||
// 설치 불가능하다면 check_env를 출력
|
||||
// Display check_env if it is not installable
|
||||
if(!$this->install_enable) return $this->dispInstallCheckEnv();
|
||||
|
||||
// ftp 정보 입력
|
||||
// Enter ftp information
|
||||
if(ini_get('safe_mode') && !Context::isFTPRegisted()) {
|
||||
$this->setTemplateFile('ftp');
|
||||
} else {
|
||||
|
|
@ -71,18 +67,16 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief DB 정보/ 최고 관리자 정보 입력 화면을 보여줌
|
||||
* @brief Display a screen to enter DB and administrator's information
|
||||
**/
|
||||
function dispInstallForm() {
|
||||
// 설치 불가능하다면 check_env를 출력
|
||||
// Display check_env if not installable
|
||||
if(!$this->install_enable) return $this->dispInstallCheckEnv();
|
||||
|
||||
// db_type이 지정되지 않았다면 다시 초기화면 출력
|
||||
// Return to the start-up screen if db_type is not specified
|
||||
if(!Context::get('db_type')) return $this->dispInstallSelectDB();
|
||||
|
||||
Context::set('time_zone', $GLOBALS['time_zone']);
|
||||
|
||||
// disp_db_info_form.html 파일 출력
|
||||
// Output the file, disp_db_info_form.html
|
||||
$tpl_filename = sprintf('form.%s', Context::get('db_type'));
|
||||
$this->setTemplateFile($tpl_filename);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue