From e3e1babcb1610e9380e899163b364d143db9d91f Mon Sep 17 00:00:00 2001 From: bnu Date: Mon, 1 Dec 2014 16:21:34 +0900 Subject: [PATCH] =?UTF-8?q?#1051=20license=20=EB=8F=99=EC=9D=98=20?= =?UTF-8?q?=EC=A0=88=EC=B0=A8=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/lang/lang.xml | 16 ++++++++++ index.php | 7 ++--- modules/admin/admin.admin.view.php | 12 ++++++-- modules/admin/tpl/index.html | 29 ++++++++++++++---- modules/install/conf/module.xml | 2 ++ modules/install/install.controller.php | 28 +++++++++++++++++ modules/install/install.view.php | 11 +++++++ modules/install/lang/lang.xml | 4 +++ modules/install/tpl/check_env.html | 3 +- modules/install/tpl/introduce.html | 2 +- modules/install/tpl/license_agreement.html | 35 ++++++++++++++++++++++ modules/install/tpl/progress_menu.html | 1 + 12 files changed, 136 insertions(+), 14 deletions(-) create mode 100644 modules/install/tpl/license_agreement.html diff --git a/common/lang/lang.xml b/common/lang/lang.xml index 505a675d4..4a0732530 100644 --- a/common/lang/lang.xml +++ b/common/lang/lang.xml @@ -3917,4 +3917,20 @@ + + + + + + Copyright (C) NAVER <http://www.navercorp.com>

"XpressEngine (XE)"은 자유 소프트웨어이며, 오픈 소스 프로젝트로 개발되고 있습니다. 자세한 내용은 아래 링크를 참조하시기 바랍니다.

"XpressEngine (XE)"은 자유 소프트웨어입니다. 소프트웨어의 피양도자는 자유 소프트웨어 재단이 공표한 GNU 약소 일반 공중 사용 허가서 2.1판 또는 그 이후 판을 임의로 선택해서, 그 규정에 따라 소프트웨어를 개작하거나 재배포할 수 있습니다.

이 소프트웨어는 유용하게 사용될 수 있으리라는 희망에서 배포되고 있지만, 특정한 목적에 맞는 적합성 여부나 판매용으로 사용할 수 있으리라는 묵시적인 보증을 포함한 어떠한 형태의 보증도 제공하지 않습니다. 보다 자세한 사항에 대해서는 GNU 약소 일반 공중 사용 허가서를 참고하시기 바랍니다.

GNU 약소 일반 공중 사용 허가서는 이 라이브러리와 함께 제공됩니다. 만약, 이 문서가 누락되어 있다면 자유 소프트웨어 재단으로 문의하시기 바랍니다. (자유 소프트웨어 재단: Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA)

]]>
+ Copyright (C) NAVER <http://www.navercorp.com>

"XpressEngine (XE)" is an opensource and being developed in the opensource project. For more information, please see the link below.

"XpressEngine (XE)" is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

]]>
+
+ + + + + + + + diff --git a/index.php b/index.php index 1b9780e8b..90c646c52 100644 --- a/index.php +++ b/index.php @@ -5,13 +5,10 @@ * @author NAVER (developers@xpressengine.com) * @brief Start page * - * Find and create module object by mif, act in Request Argument - * Set module information - * * @mainpage XpressEngine * @section intro introduction * - * XE is an opensource and being developed in the opensource project.\n + * "XpressEngine (XE)" is an opensource and being developed in the opensource project.\n * For more information, please see the link below. * - Official website: http://www.xpressengine.com * - Offcial Repository: https://github.com/xpressengine/xe-core @@ -21,7 +18,7 @@ * License as published by the Free Software Foundation; either \n * version 2.1 of the License, or (at your option) any later version. \n * \n - * This library is distributed in the hope that it will be useful, + * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. diff --git a/modules/admin/admin.admin.view.php b/modules/admin/admin.admin.view.php index fc50da38a..e84a861b9 100644 --- a/modules/admin/admin.admin.view.php +++ b/modules/admin/admin.admin.view.php @@ -381,6 +381,16 @@ class adminAdminView extends admin $isEnviromentGatheringAgreement = TRUE; } Context::set('isEnviromentGatheringAgreement', $isEnviromentGatheringAgreement); + + // license agreement check + $isLicenseAgreement = FALSE; + $path = FileHandler::getRealPath('./files/env/license_agreement'); + $isLicenseAgreement = FALSE; + if(file_exists($path)) + { + $isLicenseAgreement = TRUE; + } + Context::set('isLicenseAgreement', $isLicenseAgreement); Context::set('layout', 'none'); $this->setTemplateFile('index'); @@ -515,7 +525,6 @@ class adminAdminView extends admin $img = sprintf('', $server . $params); Context::addHtmlFooter($img); - FileHandler::removeDir($path); FileHandler::writeFile($path . $mainVersion, '1'); } else if(isset($_SESSION['enviroment_gather']) && !file_exists(FileHandler::getRealPath($path . $mainVersion))) @@ -528,7 +537,6 @@ class adminAdminView extends admin Context::addHtmlFooter($img); } - FileHandler::removeDir($path); FileHandler::writeFile($path . $mainVersion, '1'); unset($_SESSION['enviroment_gather']); } diff --git a/modules/admin/tpl/index.html b/modules/admin/tpl/index.html index 787967079..15f754e49 100644 --- a/modules/admin/tpl/index.html +++ b/modules/admin/tpl/index.html @@ -10,12 +10,29 @@

{$lang->control_panel} {$lang->help}

+ +

{$XE_VALIDATOR_MESSAGE}

+ +
+ + + + + + +

{$lang->license_agreement}

+
{$lang->license}
+
+ +
+
+
@@ -27,17 +44,19 @@
+

{$lang->need_update_and_table}

{$lang->need_update}

{$lang->need_table}

+

{$lang->available_new_version}

- +
diff --git a/modules/install/conf/module.xml b/modules/install/conf/module.xml index dce73fe41..15406e777 100644 --- a/modules/install/conf/module.xml +++ b/modules/install/conf/module.xml @@ -4,6 +4,7 @@ + @@ -17,6 +18,7 @@ + diff --git a/modules/install/install.controller.php b/modules/install/install.controller.php index 1353434de..7e04343ab 100644 --- a/modules/install/install.controller.php +++ b/modules/install/install.controller.php @@ -9,6 +9,7 @@ class installController extends install { var $db_tmp_config_file = ''; var $etc_tmp_config_file = ''; + var $flagLicenseAgreement = './files/env/license_agreement'; /** * @brief Initialization @@ -377,6 +378,33 @@ class installController extends install return $install_enable; } + /** + * @brief License agreement + */ + function procInstallLicenseAggrement() + { + $vars = Context::getRequestVars(); + + $license_agreement = ($vars->license_agreement == 'Y') ? true : false; + + if($license_agreement) + { + $currentTime = $_SERVER['REQUEST_TIME']; + FileHandler::writeFile($this->flagLicenseAgreement, $currentTime); + } + else + { + FileHandler::removeFile($this->flagLicenseAgreement); + return new Object(-1, 'msg_must_accept_license_agreement'); + } + + if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) + { + $returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispInstallCheckEnv'); + $this->setRedirectUrl($returnUrl); + } + } + /** * check this server can use rewrite module * make a file to files/config and check url approach by ".htaccess" rules diff --git a/modules/install/install.view.php b/modules/install/install.view.php index 24b80ebc2..9a7573a72 100644 --- a/modules/install/install.view.php +++ b/modules/install/install.view.php @@ -79,6 +79,17 @@ class installView extends install $this->setTemplateFile('introduce'); } + /** + * @brief License agreement + */ + function dispInstallLicenseAgreement() + { + $this->setTemplateFile('license_agreement'); + + $lang_type = Context::getLangType(); + Context::set('lang_type', $lang_type); + } + /** * @brief Display messages about installation environment */ diff --git a/modules/install/lang/lang.xml b/modules/install/lang/lang.xml index 437196e3d..ceebf0d74 100644 --- a/modules/install/lang/lang.xml +++ b/modules/install/lang/lang.xml @@ -31,6 +31,10 @@ + + + + diff --git a/modules/install/tpl/check_env.html b/modules/install/tpl/check_env.html index 6f2c73068..4de19e0a2 100644 --- a/modules/install/tpl/check_env.html +++ b/modules/install/tpl/check_env.html @@ -34,9 +34,10 @@
{$lang->about_nginx_rewrite}

+
- {$lang->cmd_back} + {$lang->cmd_back} {$lang->cmd_install_next} diff --git a/modules/install/tpl/introduce.html b/modules/install/tpl/introduce.html index 225cff1cf..6d0f4957f 100644 --- a/modules/install/tpl/introduce.html +++ b/modules/install/tpl/introduce.html @@ -12,7 +12,7 @@
diff --git a/modules/install/tpl/license_agreement.html b/modules/install/tpl/license_agreement.html new file mode 100644 index 000000000..49d4d1331 --- /dev/null +++ b/modules/install/tpl/license_agreement.html @@ -0,0 +1,35 @@ + + + +
+ +
+
+

{$XE_VALIDATOR_MESSAGE}

+
+

{$lang->license_agreement}

+
+ + + +
+
{$lang->license}
+
+ +
+ +
+ +
+ + {$lang->cmd_back} + + + + +
+
+
+
+ + diff --git a/modules/install/tpl/progress_menu.html b/modules/install/tpl/progress_menu.html index 9a75f09bd..244182b10 100644 --- a/modules/install/tpl/progress_menu.html +++ b/modules/install/tpl/progress_menu.html @@ -1,6 +1,7 @@
  • {$lang->install_progress_menu['language']}
  • +
  • {$lang->install_progress_menu['license_agreement']}
  • {$lang->install_progress_menu['condition']}
  • {$lang->install_progress_menu['ftp']}
  • {$lang->install_progress_menu['dbSelect']}