diff --git a/classes/context/Context.class.php b/classes/context/Context.class.php index 334a1abfa..170641063 100644 --- a/classes/context/Context.class.php +++ b/classes/context/Context.class.php @@ -88,6 +88,8 @@ Context::set('site_module_info', $site_module_info); if($site_module_info->site_srl && isSiteID($site_module_info->vid)) Context::set('vid', $site_module_info->vid); + $this->db_info->lang_type = $site_module_info->default_language; + if(!$this->db_info->lang_type) $this->db_info->lang_type = 'en'; } // 언어 파일 불러오기 @@ -97,14 +99,9 @@ if($_COOKIE['lang_type']) $this->lang_type = $_COOKIE['lang_type']; // 사용자 설정 언어 타입이 없으면 기본 언어타입으로 지정 - if(!$this->lang_type) { - // 가상 사이트라면 가상사이트의 언어타입으로 지정 - if($site_module_info && $site_module_info->default_language) $this->lang_type = $site_module_info->default_language; - else $this->lang_type = $this->db_info->lang_type; - } + if(!$this->lang_type) $this->lang_type = $this->db_info->lang_type; // 관리자 설정 언어값에 등록된 것이 아니라면 기본 언어로 변경 - if(!in_array($this->lang_type, array_keys($lang_supported))) $this->lang_type = $this->db_info->lang_type; if(!$this->lang_type) $this->lang_type = "en"; Context::set('lang_supported', $lang_supported); diff --git a/classes/display/DisplayHandler.class.php b/classes/display/DisplayHandler.class.php index 47ca46f2c..66c7048ac 100644 --- a/classes/display/DisplayHandler.class.php +++ b/classes/display/DisplayHandler.class.php @@ -118,6 +118,9 @@ if(__DEBUG__==3) $GLOBALS['__trans_content_elapsed__'] = getMicroTime()-$start; + // 간혹 background-image에 url(none) 때문에 request가 한번 더 일어나는 경우가 생기는 것을 방지 + $output = preg_replace('/url\((["\']?)none(["\']?)\)/is', 'none', $output); + // 최종 레이아웃 변환 Context::set('content', $output); $output = $oTemplate->compile('./common/tpl', 'common_layout'); diff --git a/common/lang/en.lang.php b/common/lang/en.lang.php index f89ac89c4..3f9213406 100644 --- a/common/lang/en.lang.php +++ b/common/lang/en.lang.php @@ -225,7 +225,7 @@ $lang->msg_invalid_format = 'Invalid Format'; $lang->msg_not_permitted_act = 'You do not have permission to execute requested action'; - $lang->msg_module_is_not_exists = 'Requested module could not be found'; + $lang->msg_module_is_not_exists = "Start the module is not enabled.\nSetup the start module on the administrator page."; $lang->msg_module_is_not_standalone = 'Requested module cannot be executed independently'; $lang->success_registed = 'Registered successfully'; diff --git a/common/lang/es.lang.php b/common/lang/es.lang.php index 7b742beea..8b181f61f 100644 --- a/common/lang/es.lang.php +++ b/common/lang/es.lang.php @@ -231,7 +231,7 @@ $lang->msg_invalid_format = 'Invalid Format'; $lang->msg_not_permitted_act = 'No está permitodo para ejecutar esta acción'; - $lang->msg_module_is_not_exists = 'No existe el Módulo requerido'; + $lang->msg_module_is_not_exists = "Inicie el módulo no está habilitado.\nEl inicio de instalación del módulo en el administrador de la página."; $lang->msg_module_is_not_standalone = 'El Módulo requerido no funciona solo.'; $lang->success_registed = 'Registrado con éxito'; diff --git a/common/lang/fr.lang.php b/common/lang/fr.lang.php index d7b8ebc29..e46d7b6df 100644 --- a/common/lang/fr.lang.php +++ b/common/lang/fr.lang.php @@ -225,7 +225,7 @@ $lang->msg_invalid_format = 'Invalid Format'; $lang->msg_not_permitted_act = 'Vous n\'êtes pas autorisés à exécuter l\'action que vous avez demandé.'; - $lang->msg_module_is_not_exists = 'Le module demandé n\'a pas été trouvé.'; + $lang->msg_module_is_not_exists = "Démarrez le module n'est pas activé.\nLe lancement du module d'installation de l'administrateur sur la page."; $lang->msg_module_is_not_standalone = 'Le module demandé ne peut pas être exécuté indépendamment.'; $lang->success_registed = 'Enregistré avec succès'; diff --git a/common/lang/ge.lang.php b/common/lang/ge.lang.php index 5daf10a37..cd6af506d 100644 --- a/common/lang/ge.lang.php +++ b/common/lang/ge.lang.php @@ -225,7 +225,7 @@ $lang->msg_invalid_format = 'Invalid Format'; $lang->msg_not_permitted_act = 'Sie haben keine Berechtigung zur Ausführung angeforderte Aktion'; - $lang->msg_module_is_not_exists = 'Gewünschte Modul konnte nicht gefunden werden'; + $lang->msg_module_is_not_exists ="Starten Sie das Modul nicht aktiviert ist.\nEinstellen der Start-Modul auf der Seite Administrator."; $lang->msg_module_is_not_standalone = 'Gewünschte Modul kann nicht ausgeführt werden unabhängig'; $lang->success_registed = 'Anmeldungsdatum'; diff --git a/common/lang/jp.lang.php b/common/lang/jp.lang.php index 865ee3991..1978f441a 100644 --- a/common/lang/jp.lang.php +++ b/common/lang/jp.lang.php @@ -225,7 +225,7 @@ $lang->msg_invalid_format = 'Invalid Format'; $lang->msg_not_permitted_act = '現在の操作は実行する権限がありません。'; - $lang->msg_module_is_not_exists = 'モジュールが見つかりません。'; + $lang->msg_module_is_not_exists = "モジュールの起動を有効にされていません。\n管理者ページにセットアップを開始するモジュール。"; $lang->msg_module_is_not_standalone = 'このモジュールはスタンドアローンでは作動しません。'; $lang->success_registed = '登録しました。'; diff --git a/common/lang/ko.lang.php b/common/lang/ko.lang.php index 7b53d6d61..47b53482a 100644 --- a/common/lang/ko.lang.php +++ b/common/lang/ko.lang.php @@ -225,7 +225,7 @@ $lang->msg_invalid_format = '잘못된 형식입니다'; $lang->msg_not_permitted_act = '요청하신 기능을 실행할 수 있는 권한이 없습니다'; - $lang->msg_module_is_not_exists = '요청하신 모듈을 찾을 수 없습니다'; + $lang->msg_module_is_not_exists = "시작 모듈이 설정되어 있지 않습니다.\n관리자 페이지에서 시작 모듈을 설정해주세요"; $lang->msg_module_is_not_standalone = '요청하신 모듈은 독립적으로 동작할 수가 없습니다'; $lang->success_registed = '등록되었습니다'; diff --git a/common/lang/ru.lang.php b/common/lang/ru.lang.php index b8f402930..ae71657c0 100644 --- a/common/lang/ru.lang.php +++ b/common/lang/ru.lang.php @@ -223,7 +223,7 @@ $lang->msg_invalid_format = 'Invalid Format'; $lang->msg_not_permitted_act = 'У Вас нет прав для исполнения запрошенного действия'; - $lang->msg_module_is_not_exists = 'Запрошенный модуль не найден'; + $lang->msg_module_is_not_exists = "Запустить модуль не включен.\nУстановка запуска модуля администратор странице."; $lang->msg_module_is_not_standalone = 'Запрошенный модуль не может быть исполнен независимо'; $lang->success_registed = 'Зарегистрировано успешно'; diff --git a/common/lang/zh-CN.lang.php b/common/lang/zh-CN.lang.php index 978dcd435..d6e20ed3f 100644 --- a/common/lang/zh-CN.lang.php +++ b/common/lang/zh-CN.lang.php @@ -225,7 +225,7 @@ $lang->msg_invalid_format = 'Invalid Format'; $lang->msg_not_permitted_act = '没有权限执行 action命令'; - $lang->msg_module_is_not_exists = '找不到您查询的模块'; + $lang->msg_module_is_not_exists = "启动模块没有启用。\n安装启动模块的管理员网页。"; $lang->msg_module_is_not_standalone = '您请求的模块不能单独执行'; $lang->success_registed = '提交成功!'; diff --git a/common/lang/zh-TW.lang.php b/common/lang/zh-TW.lang.php index 1f260425d..510c83af1 100644 --- a/common/lang/zh-TW.lang.php +++ b/common/lang/zh-TW.lang.php @@ -225,7 +225,7 @@ $lang->msg_invalid_format = 'Invalid Format'; $lang->msg_not_permitted_act = '沒有權限執行'; - $lang->msg_module_is_not_exists = '找不到您查詢的模組'; + $lang->msg_module_is_not_exists = "啟動模塊沒有啟用。\n安裝啟動模塊的管理員網頁。"; $lang->msg_module_is_not_standalone = '您請求的模組不能單獨執行'; $lang->success_registed = '成功送出!'; diff --git a/modules/admin/admin.admin.view.php b/modules/admin/admin.admin.view.php index 20216939d..99b33f0ea 100644 --- a/modules/admin/admin.admin.view.php +++ b/modules/admin/admin.admin.view.php @@ -239,11 +239,14 @@ $output = executeQuery("admin.getCommentDeclaredCount", $args); $status->commentDeclared->total = $output->data->count; + $site_args->site_srl = 0; + $output = executeQuery('module.getSiteInfo', $site_args); + Context::set('start_module', $output->data); + Context::set('status', $status); Context::set('layout','none'); $this->setTemplateFile('index'); - //$this->setTemplateFile('a'); } /** @@ -262,6 +265,21 @@ Context::set('ftp_info', Context::getFTPInfo()); + $oModuleModel = &getModel('module'); + $site_args->site_srl = 0; + $list = $oModuleModel->getMidList($site_args); + $mid_list = array(); + if(count($list)) { + foreach($list as $key => $val) { + $mid_list[$val->module][$key] = $val; + } + } + Context::set('mid_list', $mid_list); + + $site_args->site_srl = 0; + $output = executeQuery('module.getSiteInfo', $site_args); + Context::set('start_module', $output->data); + Context::set('layout','none'); $this->setTemplateFile('config'); } diff --git a/modules/admin/lang/en.lang.php b/modules/admin/lang/en.lang.php index 647bdafcb..b3fd57bef 100644 --- a/modules/admin/lang/en.lang.php +++ b/modules/admin/lang/en.lang.php @@ -8,6 +8,8 @@ $lang->admin_info = 'Administrator Info'; $lang->admin_index = 'Index Admin Page'; $lang->control_panel = 'Control panel'; + $lang->start_module = 'Start Module'; + $lang->about_start_module = 'You can specify start module by default.'; $lang->module_category_title = array( 'service' => 'Service Setting', @@ -75,5 +77,5 @@ $lang->server_ports = "Server port"; $lang->about_server_ports = "If your web-server uses other than 80 for HTTP, 443 for HTTPS, you should specify server ports"; $lang->use_db_session = '인증 세션 DB 사용'; - $lang->about_db_session = '인증시 사용되는 PHP 세션을 DB로 사용하는 기능입니다.
웹서버의 사용율이 낮은 사이트에서는 비활성화시 사이트 응답 속도가 향상될 수 있습니다'; + $lang->about_db_session = '인증시 사용되는 PHP 세션을 DB로 사용하는 기능입니다.
웹서버의 사용율이 낮은 사이트에서는 비활성화시 사이트 응답 속도가 향상될 수 있습니다
단 현재 접속자를 구할 수 없어 관련된 기능을 사용할 수 없게 됩니다.'; ?> diff --git a/modules/admin/lang/es.lang.php b/modules/admin/lang/es.lang.php index 23eadf582..a85ed7d5b 100644 --- a/modules/admin/lang/es.lang.php +++ b/modules/admin/lang/es.lang.php @@ -8,6 +8,8 @@ $lang->admin_info = 'Administrador de Información'; $lang->admin_index = 'Índice de la página admin'; $lang->control_panel = 'Control panel'; + $lang->start_module = 'Módulo de inicio'; + $lang->about_start_module = 'Puede especificar el módulo de inicio por defecto.'; $lang->module_category_title = array( 'service' => 'Service Setting', @@ -77,5 +79,5 @@ $lang->server_ports = "Especifique el puerto del servidor"; $lang->about_server_ports = "80 de HTTP, HTTPS al puerto 443 si se utiliza otro que se especifique lo contrario, el puerto va a necesitar."; $lang->use_db_session = '인증 세션 DB 사용'; - $lang->about_db_session = '인증시 사용되는 PHP 세션을 DB로 사용하는 기능입니다.
웹서버의 사용율이 낮은 사이트에서는 비활성화시 사이트 응답 속도가 향상될 수 있습니다'; + $lang->about_db_session = '인증시 사용되는 PHP 세션을 DB로 사용하는 기능입니다.
웹서버의 사용율이 낮은 사이트에서는 비활성화시 사이트 응답 속도가 향상될 수 있습니다
단 현재 접속자를 구할 수 없어 관련된 기능을 사용할 수 없게 됩니다.'; ?> diff --git a/modules/admin/lang/fr.lang.php b/modules/admin/lang/fr.lang.php index afbd0aca1..d815ffee9 100644 --- a/modules/admin/lang/fr.lang.php +++ b/modules/admin/lang/fr.lang.php @@ -8,6 +8,8 @@ $lang->admin_info = 'Informations d\'Administrateur'; $lang->admin_index = 'Page de l\'indice pour l\'Administrateur'; $lang->control_panel = 'Control panel'; + $lang->start_module = 'Start Module'; + $lang->about_start_module = 'Vous pouvez spécifier début module par défaut.'; $lang->module_category_title = array( 'service' => 'Service Setting', @@ -76,5 +78,5 @@ $lang->server_ports = "déclarer le port de serveur"; $lang->about_server_ports = "Si l'on ne veut pas utiliser le port 80 pour HTTP mais un autre port, ou bien, si l'on ne veut pas utiliser le port 443 pour HTTPS mais un autre port, on doit déclarer les ports."; $lang->use_db_session = '인증 세션 DB 사용'; - $lang->about_db_session = '인증시 사용되는 PHP 세션을 DB로 사용하는 기능입니다.
웹서버의 사용율이 낮은 사이트에서는 비활성화시 사이트 응답 속도가 향상될 수 있습니다'; + $lang->about_db_session = '인증시 사용되는 PHP 세션을 DB로 사용하는 기능입니다.
웹서버의 사용율이 낮은 사이트에서는 비활성화시 사이트 응답 속도가 향상될 수 있습니다
단 현재 접속자를 구할 수 없어 관련된 기능을 사용할 수 없게 됩니다.'; ?> diff --git a/modules/admin/lang/jp.lang.php b/modules/admin/lang/jp.lang.php index e90db21e9..e34acd01f 100644 --- a/modules/admin/lang/jp.lang.php +++ b/modules/admin/lang/jp.lang.php @@ -8,6 +8,8 @@ $lang->admin_info = '管理者情報'; $lang->admin_index = '管理者トップページ'; $lang->control_panel = 'コントロールパネル'; + $lang->start_module = 'モジュールを起動します'; + $lang->about_start_module = 'デフォルトで起動するモジュールを指定することができます。'; $lang->module_category_title = array( 'service' => 'サービス管理', @@ -76,5 +78,5 @@ $lang->server_ports = "サーバーポート指定"; $lang->about_server_ports = "一般的に使われているHTTPの80、HTTPSの443以外の他のポートを使うために、ポートを指定して下さい。"; $lang->use_db_session = '인증 세션 DB 사용'; - $lang->about_db_session = '인증시 사용되는 PHP 세션을 DB로 사용하는 기능입니다.
웹서버의 사용율이 낮은 사이트에서는 비활성화시 사이트 응답 속도가 향상될 수 있습니다'; + $lang->about_db_session = '인증시 사용되는 PHP 세션을 DB로 사용하는 기능입니다.
웹서버의 사용율이 낮은 사이트에서는 비활성화시 사이트 응답 속도가 향상될 수 있습니다
단 현재 접속자를 구할 수 없어 관련된 기능을 사용할 수 없게 됩니다.'; ?> diff --git a/modules/admin/lang/ko.lang.php b/modules/admin/lang/ko.lang.php index 5e27f9e5d..bd8efb827 100644 --- a/modules/admin/lang/ko.lang.php +++ b/modules/admin/lang/ko.lang.php @@ -8,6 +8,8 @@ $lang->admin_info = '관리자 정보'; $lang->admin_index = '관리자 초기 페이지'; $lang->control_panel = '제어판'; + $lang->start_module = '시작 모듈'; + $lang->about_start_module = '사이트 접속시 기본으로 호출될 모듈을 지정할 수 있습니다.'; $lang->module_category_title = array( 'service' => '서비스 관리', @@ -76,5 +78,5 @@ $lang->server_ports = '서버포트지정'; $lang->about_server_ports = 'HTTP는 80, HTTPS는 443이외의 다른 포트를 사용하는 경우에 포트를 지정해주어야합니다.'; $lang->use_db_session = '인증 세션 DB 사용'; - $lang->about_db_session = '인증시 사용되는 PHP 세션을 DB로 사용하는 기능입니다.
웹서버의 사용율이 낮은 사이트에서는 비활성화시 사이트 응답 속도가 향상될 수 있습니다'; + $lang->about_db_session = '인증시 사용되는 PHP 세션을 DB로 사용하는 기능입니다.
웹서버의 사용율이 낮은 사이트에서는 비활성화시 사이트 응답 속도가 향상될 수 있습니다
단 현재 접속자를 구할 수 없어 관련된 기능을 사용할 수 없게 됩니다.'; ?> diff --git a/modules/admin/lang/ru.lang.php b/modules/admin/lang/ru.lang.php index e2fc8c1bc..154213f68 100644 --- a/modules/admin/lang/ru.lang.php +++ b/modules/admin/lang/ru.lang.php @@ -8,6 +8,8 @@ $lang->admin_info = 'Информация администратора'; $lang->admin_index = 'Индексная страница администратора'; $lang->control_panel = 'Control panel'; + $lang->start_module = 'Начало модуля'; + $lang->about_start_module = 'Вы можете указать модуль запуска по умолчанию.'; $lang->module_category_title = array( 'service' => 'Service Setting', @@ -76,5 +78,5 @@ $lang->server_ports = "서버포트지정"; $lang->about_server_ports = "HTTP는 80, HTTPS는 443이외의 다른 포트를 사용하는 경우에 포트를 지정해주어야합니다."; $lang->use_db_session = '인증 세션 DB 사용'; - $lang->about_db_session = '인증시 사용되는 PHP 세션을 DB로 사용하는 기능입니다.
웹서버의 사용율이 낮은 사이트에서는 비활성화시 사이트 응답 속도가 향상될 수 있습니다'; + $lang->about_db_session = '인증시 사용되는 PHP 세션을 DB로 사용하는 기능입니다.
웹서버의 사용율이 낮은 사이트에서는 비활성화시 사이트 응답 속도가 향상될 수 있습니다
단 현재 접속자를 구할 수 없어 관련된 기능을 사용할 수 없게 됩니다.'; ?> diff --git a/modules/admin/lang/zh-CN.lang.php b/modules/admin/lang/zh-CN.lang.php index 6300187b1..09a7a1626 100644 --- a/modules/admin/lang/zh-CN.lang.php +++ b/modules/admin/lang/zh-CN.lang.php @@ -8,6 +8,8 @@ $lang->admin_info = '管理员信息'; $lang->admin_index = '管理首页'; $lang->control_panel = '控制面板'; + $lang->start_module = '启动模块'; + $lang->about_start_module = '您可以指定默认的启动模块。'; $lang->module_category_title = array( 'service' => '应用管理', @@ -76,5 +78,5 @@ $lang->server_ports = "指定服务器端口"; $lang->about_server_ports = "使用除HTTP(80), HTTPS(443)以外的端口时,必须得指定该服务器端口号。"; $lang->use_db_session = '인증 세션 DB 사용'; - $lang->about_db_session = '인증시 사용되는 PHP 세션을 DB로 사용하는 기능입니다.
웹서버의 사용율이 낮은 사이트에서는 비활성화시 사이트 응답 속도가 향상될 수 있습니다'; + $lang->about_db_session = '인증시 사용되는 PHP 세션을 DB로 사용하는 기능입니다.
웹서버의 사용율이 낮은 사이트에서는 비활성화시 사이트 응답 속도가 향상될 수 있습니다
단 현재 접속자를 구할 수 없어 관련된 기능을 사용할 수 없게 됩니다.'; ?> diff --git a/modules/admin/lang/zh-TW.lang.php b/modules/admin/lang/zh-TW.lang.php index 6018db9f0..03d13d8de 100644 --- a/modules/admin/lang/zh-TW.lang.php +++ b/modules/admin/lang/zh-TW.lang.php @@ -8,6 +8,8 @@ $lang->admin_info = '管理員資訊'; $lang->admin_index = '管理頁面'; $lang->control_panel = '控制介面'; + $lang->start_module = '啟動模塊'; + $lang->about_start_module = '您可以指定默認的啟動模塊。'; $lang->module_category_title = array( 'service' => '服務設定', @@ -76,5 +78,5 @@ $lang->server_ports = "主機埠口"; $lang->about_server_ports = "HTTP預設埠口是『80』、HTTPS是『443』,如果想使用其他的埠口的話,請自行設定。"; $lang->use_db_session = '인증 세션 DB 사용'; - $lang->about_db_session = '인증시 사용되는 PHP 세션을 DB로 사용하는 기능입니다.
웹서버의 사용율이 낮은 사이트에서는 비활성화시 사이트 응답 속도가 향상될 수 있습니다'; + $lang->about_db_session = '인증시 사용되는 PHP 세션을 DB로 사용하는 기능입니다.
웹서버의 사용율이 낮은 사이트에서는 비활성화시 사이트 응답 속도가 향상될 수 있습니다
단 현재 접속자를 구할 수 없어 관련된 기능을 사용할 수 없게 됩니다.'; ?> diff --git a/modules/admin/tpl/config.html b/modules/admin/tpl/config.html index d131110a4..201513c59 100644 --- a/modules/admin/tpl/config.html +++ b/modules/admin/tpl/config.html @@ -32,6 +32,20 @@

{$lang->about_default_url}

+ +
{$lang->start_module}
+ + +

{$lang->about_start_module}

+ +
{$lang->use_optimizer}
diff --git a/modules/admin/tpl/index.html b/modules/admin/tpl/index.html index e563b6d1f..584789032 100644 --- a/modules/admin/tpl/index.html +++ b/modules/admin/tpl/index.html @@ -166,6 +166,10 @@
{$lang->current_path}
{$installed_path}/ + +
{$lang->start_module}
+ {cut_str($start_module->browser_title,10)} +
{$lang->time_zone}
{substr($val,1,10)} diff --git a/modules/board/board.class.php b/modules/board/board.class.php index e9d684db8..d58d83cb1 100644 --- a/modules/board/board.class.php +++ b/modules/board/board.class.php @@ -33,26 +33,21 @@ // 기본 모듈을 찾음 $oModuleModel = &getModel('module'); - $module_info = $oModuleModel->getDefaultMid(); - - // 기본 모듈이 없으면 새로 등록 - if(!$module_info->module_srl) { + $site_args->site_srl = 0; + $mid_list = $oModuleModel->getMidList($site_args); + if(!count($mid_list)) { $args->mid = 'board'; $args->module = 'board'; $args->browser_title = 'test module'; - $args->is_default = 'Y'; $args->skin = 'xe_default'; $args->site_srl = 0; - - // board 라는 이름의 모듈이 있는지 확인 - $module_info = $oModuleModel->getModuleInfoByMid($args->board_name); - if($module_info->module_srl) { - $args->module_srl = $module_info->module_srl; - $oModuleController->updateModule($args); - } else { - $args->module_srl = 0; - $oModuleController->insertModule($args); - } + $output = $oModuleController->insertModule($args); + $module_srl = $output->get('module_srl'); + + $site_args->site_srl = 0; + $site_args->index_module_srl = $module_srl; + $oModuleController = &getController('module'); + $oModuleController->updateSite($site_args); } return new Object(); diff --git a/modules/board/tpl/board_insert.html b/modules/board/tpl/board_insert.html index 38c44b53f..f4d50ea8f 100644 --- a/modules/board/tpl/board_insert.html +++ b/modules/board/tpl/board_insert.html @@ -5,9 +5,6 @@
- - - @@ -18,15 +15,6 @@

{$lang->about_mid}

- - - - - - - + diff --git a/modules/install/install.admin.controller.php b/modules/install/install.admin.controller.php index 6974d8f56..8189cfe29 100644 --- a/modules/install/install.admin.controller.php +++ b/modules/install/install.admin.controller.php @@ -42,7 +42,7 @@ } /** - * @brief time zone변경 + * @brief 설정 변경 **/ function procInstallAdminSaveTimeZone() { $use_rewrite = Context::get('use_rewrite'); @@ -62,7 +62,6 @@ $use_ssl = Context::get('use_ssl'); if(!$use_ssl) $use_ssl = 'none'; - $http_port = Context::get('http_port'); $https_port = Context::get('https_port'); @@ -74,7 +73,6 @@ $db_info->use_db_session = $use_db_session; $db_info->use_rewrite = $use_rewrite; $db_info->use_optimizer = $use_optimizer; - $db_info->lang_type = Context::get('change_lang_type'); $db_info->use_ssl = $use_ssl; if($http_port) $db_info->http_port = (int) $http_port; else if($db_info->http_port) unset($db_info->http_port); @@ -82,11 +80,18 @@ if($https_port) $db_info->https_port = (int) $https_port; else if($db_info->https_port) unset($db_info->https_port); + unset($db_info->lang_type); Context::setDBInfo($db_info); $oInstallController = &getController('install'); $oInstallController->makeConfigFile(); + $site_args->site_srl = 0; + $site_args->index_module_srl = Context::get('index_module_srl'); + $site_args->default_language = Context::get('change_lang_type'); + $oModuleController = &getController('module'); + $oModuleController->updateSite($site_args); + $this->setMessage('success_updated'); } diff --git a/modules/issuetracker/tpl/index.html b/modules/issuetracker/tpl/index.html index b6793f2ac..b9034629d 100644 --- a/modules/issuetracker/tpl/index.html +++ b/modules/issuetracker/tpl/index.html @@ -48,7 +48,7 @@ - + diff --git a/modules/issuetracker/tpl/project_insert.html b/modules/issuetracker/tpl/project_insert.html index 24f9781a3..84140b876 100644 --- a/modules/issuetracker/tpl/project_insert.html +++ b/modules/issuetracker/tpl/project_insert.html @@ -5,9 +5,6 @@ - - -
{$lang->is_default}
- is_default=='Y')-->checked="checked" id="fld_for_default" class="checkbox" /> - -
{$lang->module_category}
diff --git a/modules/board/tpl/index.html b/modules/board/tpl/index.html index 0d65f69a0..91b1e8dcb 100644 --- a/modules/board/tpl/index.html +++ b/modules/board/tpl/index.html @@ -54,7 +54,7 @@ {zdate($val->regdate,"Y-m-d")} {$lang->cmd_setup} {$lang->cmd_copy}{$lang->cmd_delete}-{$lang->cmd_delete}
{zdate($val->regdate,"Y-m-d")} {$lang->cmd_setup} {$lang->cmd_copy}{$lang->cmd_delete}-{$lang->cmd_delete}
@@ -19,15 +16,6 @@

{$lang->about_mid}

- - - - - - diff --git a/modules/lifepod/tpl/index.html b/modules/lifepod/tpl/index.html index ba99e844f..d7a3f5db4 100644 --- a/modules/lifepod/tpl/index.html +++ b/modules/lifepod/tpl/index.html @@ -49,7 +49,7 @@ - + diff --git a/modules/lifepod/tpl/lifepod_info.html b/modules/lifepod/tpl/lifepod_info.html index 8bbca5865..b6dadc912 100644 --- a/modules/lifepod/tpl/lifepod_info.html +++ b/modules/lifepod/tpl/lifepod_info.html @@ -28,7 +28,7 @@ - + diff --git a/modules/lifepod/tpl/lifepod_insert.html b/modules/lifepod/tpl/lifepod_insert.html index 11feef197..56a437258 100644 --- a/modules/lifepod/tpl/lifepod_insert.html +++ b/modules/lifepod/tpl/lifepod_insert.html @@ -6,9 +6,6 @@ - - -
{$lang->is_default}
- is_default=='Y')-->checked="checked" id="fld_for_default" class="checkbox" /> - -
{$lang->module_category}
{htmlspecialchars($val->browser_title)} {zdate($val->regdate,"Y-m-d")} {$lang->cmd_setting}{$lang->cmd_delete}-{$lang->cmd_delete}
{$lang->skin}
{$module_info->skin_title} ({$module_info->skin}){$module_info->skin}
{$lang->browser_title}
@@ -19,15 +16,6 @@

{$lang->about_mid}

- - - - - -
{$lang->is_default}
- is_default=='Y')-->checked="checked" id="fld_for_default" class="checkbox" /> - -
{$lang->module_category}
diff --git a/modules/message/message.view.php b/modules/message/message.view.php index 30ebf99b5..ddd066751 100644 --- a/modules/message/message.view.php +++ b/modules/message/message.view.php @@ -37,7 +37,7 @@ } Context::set('ssl_mode',$ssl_mode); - Context::set('system_message', $this->getMessage()); + Context::set('system_message', nl2br($this->getMessage())); $this->setTemplatePath($template_path); $this->setTemplateFile('system_message'); diff --git a/modules/module/module.class.php b/modules/module/module.class.php index e89408cfb..7a4353f21 100644 --- a/modules/module/module.class.php +++ b/modules/module/module.class.php @@ -48,6 +48,11 @@ if($oDB->isColumnExists("documents","extra_vars".$i)) return true; } + // sites 테이블에 기본 사이트 정보 입력 + $args->site_srl = 0; + $output = $oDB->executeQuery('module.getSite', $args); + if(!$output->data || !$output->data->index_module_srl) return true; + return false; } @@ -245,6 +250,30 @@ $oDB->dropColumn('documents','extra_vars'.$i); } + // sites 테이블에 기본 사이트 정보 입력 + $args->site_srl = 0; + $output = $oDB->executeQuery('module.getSite', $args); + if(!$output->data || !$output->data->index_module_srl) { + // 기본 mid, 언어 구함 + $mid_output = $oDB->executeQuery('module.getDefaultMidInfo', $args); + $db_info = Context::getDBInfo(); + $domain = Context::getDefaultUrl(); + $url_info = parse_url($domain); + $domain = $url_info['host'].( (!empty($url_info['port'])&&$url_info['port']!=80)?':'.$url_info['port']:'').$url_info['path']; + $site_args->site_srl = 0; + $site_args->index_module_srl = $mid_output->data->module_srl; + $site_args->domain = $domain; + $site_args->default_language = $db_info->lang_type; + + if($output->data && !$output->data->index_module_srl) { + $output = executeQuery('module.updateSite', $site_args); + + } else { + $output = executeQuery('module.insertSite', $site_args); + if(!$output->toBool()) return $output; + } + } + return new Object(0, 'success_updated'); } diff --git a/modules/module/module.controller.php b/modules/module/module.controller.php index 49ac1fe7e..a35265cb2 100644 --- a/modules/module/module.controller.php +++ b/modules/module/module.controller.php @@ -185,13 +185,6 @@ $oDB = &DB::getInstance(); $oDB->begin(); - // is_default 의 값에 따라서 처리 - if($args->site_srl!=0) $args->is_default = 'N'; - else { - if($args->is_default!='Y') $args->is_default = 'N'; - else $this->clearDefaultModule(); - } - // 선택된 스킨정보에서 colorset을 구함 $module_path = ModuleHandler::getModulePath($args->module); $skin_info = $oModuleModel->loadSkinInfo($module_path, $args->skin); @@ -240,13 +233,6 @@ return new Object(-1, 'msg_module_name_exists'); } - // is_default 의 값에 따라서 처리 - if($args->site_srl!=0) $args->is_default = 'N'; - else { - if($args->is_default!='Y') $args->is_default = 'N'; - else $this->clearDefaultModule(); - } - $output = executeQuery('module.updateModule', $args); if(!$output->toBool()) { $oDB->rollback(); diff --git a/modules/module/module.model.php b/modules/module/module.model.php index 408b93d6b..440968ea9 100644 --- a/modules/module/module.model.php +++ b/modules/module/module.model.php @@ -93,16 +93,35 @@ } } + // 가상 사이트가 아닐 경우 기본 사이트 정보를 구함 if(!$output->data) { $args->site_srl = 0; - // site_srl이 modules에 생성되지 않은 이전 버전 사용자의 경우 관리자 페이지에 접속하지를 못하는 오류 수정 - // Parker Falcon 님이 알려주심 - $output = executeQuery('module.getDefaultMidInfo', $args); - if(!$output->toBool()) { + $output = executeQuery('module.getSiteInfo', $args); + // 기본 사이트 정보가 없으면 관련된 정보를 갱신 + if(!$output->data) { + // sites 테이블이 없을 경우 생성 $oDB = &DB::getInstance(); - $oDB->dropIndex("modules","unique_mid",true); - $oDB->addColumn('modules','site_srl','number',11,0,true); - $oDB->addIndex("modules","idx_site_mid", array("site_srl","mid"),true); + if(!$oDB->isTableExists('sites')) $oDB->createTableByXmlFile(_XE_PATH_.'modules/module/schemas/sites.xml'); + if(!$oDB->isTableExists('sites')) return; + + // 기본 mid, 언어 구함 + $mid_output = $oDB->executeQuery('module.getDefaultMidInfo', $args); + $db_info = Context::getDBInfo(); + $domain = Context::getDefaultUrl(); + $url_info = parse_url($domain); + $domain = $url_info['host'].( (!empty($url_info['port'])&&$url_info['port']!=80)?':'.$url_info['port']:'').$url_info['path']; + $site_args->site_srl = 0; + $site_args->index_module_srl = $mid_output->data->module_srl; + $site_args->domain = $domain; + $site_args->default_language = $db_info->lang_type; + + if($output->data && !$output->data->index_module_srl) { + $output = executeQuery('module.updateSite', $site_args); + } else { + $output = executeQuery('module.insertSite', $site_args); + if(!$output->toBool()) return $output; + } + $output = executeQuery('module.getSiteInfo', $args); } } diff --git a/modules/module/queries/getSite.xml b/modules/module/queries/getSite.xml new file mode 100644 index 000000000..f0bb1816c --- /dev/null +++ b/modules/module/queries/getSite.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/modules/opage/tpl/index.html b/modules/opage/tpl/index.html index 63f30443b..932d25ca2 100644 --- a/modules/opage/tpl/index.html +++ b/modules/opage/tpl/index.html @@ -51,7 +51,7 @@ - + diff --git a/modules/opage/tpl/opage_insert.html b/modules/opage/tpl/opage_insert.html index 112a49166..0bf9770db 100644 --- a/modules/opage/tpl/opage_insert.html +++ b/modules/opage/tpl/opage_insert.html @@ -4,9 +4,6 @@ - - -
{zdate($val->regdate,"Y-m-d")} {$lang->cmd_setup} {$lang->cmd_copy}{$lang->cmd_delete}{$lang->cmd_delete}
@@ -16,15 +13,6 @@

{$lang->about_mid}

- - - - - - - + diff --git a/modules/page/tpl/page_info.html b/modules/page/tpl/page_info.html index f4c5e3d1c..a1ca14f8e 100644 --- a/modules/page/tpl/page_info.html +++ b/modules/page/tpl/page_info.html @@ -5,9 +5,6 @@ - - -
{$lang->is_default}
- is_default=='Y')-->checked="checked" id="fld_for_default" class="checkbox" /> -

-
{$lang->module_category}
diff --git a/modules/page/tpl/index.html b/modules/page/tpl/index.html index e9df2d68a..df952c42a 100644 --- a/modules/page/tpl/index.html +++ b/modules/page/tpl/index.html @@ -54,7 +54,7 @@ {zdate($val->regdate,"Y-m-d")} {$lang->cmd_setup} {$lang->cmd_copy}{$lang->cmd_delete} {$lang->cmd_delete}
@@ -17,15 +14,6 @@

{$lang->about_mid}

- - - - - -
{$lang->is_default}
- is_default=='Y')-->checked="checked" id="fld_for_default" class="checkbox" /> - -
{$lang->module_category}
diff --git a/modules/page/tpl/page_insert.html b/modules/page/tpl/page_insert.html index 605ff0097..ceae8af9b 100644 --- a/modules/page/tpl/page_insert.html +++ b/modules/page/tpl/page_insert.html @@ -4,10 +4,6 @@ - - - - @@ -16,15 +12,6 @@

{$lang->about_mid}

- - - - - - - + diff --git a/modules/springnote/tpl/springnote_insert.html b/modules/springnote/tpl/springnote_insert.html index 8e178c2d4..5015e8c79 100644 --- a/modules/springnote/tpl/springnote_insert.html +++ b/modules/springnote/tpl/springnote_insert.html @@ -6,9 +6,6 @@ - - -
{$lang->mid}
{$lang->is_default}
- is_default=='Y')-->checked="checked" id="fld_for_default" class="checkbox" /> - -
{$lang->module_category}
diff --git a/modules/springnote/tpl/index.html b/modules/springnote/tpl/index.html index c8237f7fb..880050f3d 100644 --- a/modules/springnote/tpl/index.html +++ b/modules/springnote/tpl/index.html @@ -46,7 +46,7 @@ {htmlspecialchars($val->browser_title)} {zdate($val->regdate,"Y-m-d")} {$lang->cmd_setup}{$lang->cmd_delete} {$lang->cmd_delete}
@@ -20,15 +17,6 @@

{$lang->about_mid}

- - - - - - - + diff --git a/modules/wiki/tpl/wiki_insert.html b/modules/wiki/tpl/wiki_insert.html index 63f9f7d94..ab69abc7b 100644 --- a/modules/wiki/tpl/wiki_insert.html +++ b/modules/wiki/tpl/wiki_insert.html @@ -5,9 +5,6 @@ - - -
{$lang->is_default}
- is_default=='Y')-->checked="checked" id="fld_for_default" class="checkbox" /> - -
{$lang->module_category}
diff --git a/modules/wiki/tpl/index.html b/modules/wiki/tpl/index.html index bf2e199d0..cc87fe9be 100644 --- a/modules/wiki/tpl/index.html +++ b/modules/wiki/tpl/index.html @@ -51,7 +51,7 @@ {zdate($val->regdate,"Y-m-d")} {$lang->cmd_setup} {$lang->cmd_copy}{$lang->cmd_delete} {$lang->cmd_delete}
@@ -17,15 +14,6 @@

{$lang->about_mid}

- - - - - -
{$lang->is_default}
- is_default=='Y')-->checked="checked" id="fld_for_default" class="checkbox" /> - -
{$lang->module_category}