#1051 license 동의 절차 추가

This commit is contained in:
bnu 2014-12-01 16:21:34 +09:00
parent 8f0056b659
commit e3e1babcb1
12 changed files with 136 additions and 14 deletions

View file

@ -3917,4 +3917,20 @@
<value xml:lang="en"><![CDATA[Default url is null.]]></value> <value xml:lang="en"><![CDATA[Default url is null.]]></value>
<value xml:lang="jp"><![CDATA[基本URLが設定されていません。]]></value> <value xml:lang="jp"><![CDATA[基本URLが設定されていません。]]></value>
</item> </item>
<item name="license_agreement">
<value xml:lang="ko"><![CDATA[사용권 동의]]></value>
<value xml:lang="en"><![CDATA[License agree]]></value>
</item>
<item name="license">
<value xml:lang="ko"><![CDATA[<p>Copyright (C) NAVER &lt;http://www.navercorp.com&gt;</p> <p>"XpressEngine (XE)"은 자유 소프트웨어이며, 오픈 소스 프로젝트로 개발되고 있습니다. 자세한 내용은 아래 링크를 참조하시기 바랍니다.</p> <ul> <li>공식 사이트: <a href="http://www.xpressengine.com">http://www.xpressengine.com</a></li> <li>공식 저장소: <a href="http://github.com/xpressengine">http://github.com/xpressengine</a></li> </ul> <p>"XpressEngine (XE)"은 자유 소프트웨어입니다. 소프트웨어의 피양도자는 자유 소프트웨어 재단이 공표한 GNU 약소 일반 공중 사용 허가서 2.1판 또는 그 이후 판을 임의로 선택해서, 그 규정에 따라 소프트웨어를 개작하거나 재배포할 수 있습니다.</p> <p>이 소프트웨어는 유용하게 사용될 수 있으리라는 희망에서 배포되고 있지만, 특정한 목적에 맞는 적합성 여부나 판매용으로 사용할 수 있으리라는 묵시적인 보증을 포함한 어떠한 형태의 보증도 제공하지 않습니다. 보다 자세한 사항에 대해서는 GNU 약소 일반 공중 사용 허가서를 참고하시기 바랍니다.</p> <p>GNU 약소 일반 공중 사용 허가서는 이 라이브러리와 함께 제공됩니다. 만약, 이 문서가 누락되어 있다면 자유 소프트웨어 재단으로 문의하시기 바랍니다. (자유 소프트웨어 재단: Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA)</p> <ul> <li>한국어 번역문 (비공식) : <a href="http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html" target="_blank">GNU Lesser General Public License, version 2.1</a></li> <li>영문 (공식 원본) : <a href="http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html" target="_blank">GNU Lesser General Public License, version 2.1</a></li> </ul>]]></value>
<value xml:lang="en"><![CDATA[<p>Copyright (C) NAVER &lt;http://www.navercorp.com&gt;</p> <p>"XpressEngine (XE)" is an opensource and being developed in the opensource project. For more information, please see the link below.</p> <ul> <li>Official website: <a href="http://www.xpressengine.com">http://www.xpressengine.com</a></li> <li>Official Repository: <a href="http://github.com/xpressengine">http://github.com/xpressengine</a></li> </ul> <p>"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.</p> <p>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.</p> <p>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</p> <ul> <li>License : <a href="http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html" target="_blank">GNU Lesser General Public License, version 2.1</a></li> </ul>]]></value>
</item>
<item name="cmd_license_agree">
<value xml:lang="ko"><![CDATA[사용권에 대해 이해했으며, 이에 동의합니다.]]></value>
<value xml:lang="en"><![CDATA[I understand the license. I agree.]]></value>
</item>
<item name="msg_must_accept_license_agreement">
<value xml:lang="ko"><![CDATA[사용권에 동의해야 설치할 수 있습니다.]]></value>
<value xml:lang="en"><![CDATA[You must accept the license agreement]]></value>
</item>
</lang> </lang>

View file

@ -5,13 +5,10 @@
* @author NAVER (developers@xpressengine.com) * @author NAVER (developers@xpressengine.com)
* @brief Start page * @brief Start page
* *
* Find and create module object by mif, act in Request Argument
* Set module information
*
* @mainpage XpressEngine * @mainpage XpressEngine
* @section intro introduction * @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. * For more information, please see the link below.
* - Official website: http://www.xpressengine.com * - Official website: http://www.xpressengine.com
* - Offcial Repository: https://github.com/xpressengine/xe-core * - Offcial Repository: https://github.com/xpressengine/xe-core
@ -21,7 +18,7 @@
* License as published by the Free Software Foundation; either \n * License as published by the Free Software Foundation; either \n
* version 2.1 of the License, or (at your option) any later version. \n * version 2.1 of the License, or (at your option) any later version. \n
* \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 * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. * Lesser General Public License for more details.

View file

@ -381,6 +381,16 @@ class adminAdminView extends admin
$isEnviromentGatheringAgreement = TRUE; $isEnviromentGatheringAgreement = TRUE;
} }
Context::set('isEnviromentGatheringAgreement', $isEnviromentGatheringAgreement); 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'); Context::set('layout', 'none');
$this->setTemplateFile('index'); $this->setTemplateFile('index');
@ -515,7 +525,6 @@ class adminAdminView extends admin
$img = sprintf('<img src="%s" alt="" style="height:0px;width:0px" />', $server . $params); $img = sprintf('<img src="%s" alt="" style="height:0px;width:0px" />', $server . $params);
Context::addHtmlFooter($img); Context::addHtmlFooter($img);
FileHandler::removeDir($path);
FileHandler::writeFile($path . $mainVersion, '1'); FileHandler::writeFile($path . $mainVersion, '1');
} }
else if(isset($_SESSION['enviroment_gather']) && !file_exists(FileHandler::getRealPath($path . $mainVersion))) else if(isset($_SESSION['enviroment_gather']) && !file_exists(FileHandler::getRealPath($path . $mainVersion)))
@ -528,7 +537,6 @@ class adminAdminView extends admin
Context::addHtmlFooter($img); Context::addHtmlFooter($img);
} }
FileHandler::removeDir($path);
FileHandler::writeFile($path . $mainVersion, '1'); FileHandler::writeFile($path . $mainVersion, '1');
unset($_SESSION['enviroment_gather']); unset($_SESSION['enviroment_gather']);
} }

View file

@ -10,12 +10,29 @@
<div class="x_page-header"> <div class="x_page-header">
<h1>{$lang->control_panel} <a class="x_icon-question-sign" href="./admin/help/index.html#UMAN_dashboard" target="_blank">{$lang->help}</a></h1> <h1>{$lang->control_panel} <a class="x_icon-question-sign" href="./admin/help/index.html#UMAN_dashboard" target="_blank">{$lang->help}</a></h1>
</div> </div>
<div id="checkBrowserMessage" class="message error" style="display:none;"> <div id="checkBrowserMessage" class="message error" style="display:none;">
<h2>{$lang->checkBrowserIE8}</h2> <h2>{$lang->checkBrowserIE8}</h2>
</div> </div>
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/admin/tpl/index/1'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}"> <div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/admin/tpl/index/1'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
<p>{$XE_VALIDATOR_MESSAGE}</p> <p>{$XE_VALIDATOR_MESSAGE}</p>
</div> </div>
<form action="./" method="post" class="message info x_clearfix" cond="!$isLicenseAgreement">
<input type="hidden" name="success_return_url" value="{getUrl('', 'module', 'admin')}" />
<input type="hidden" name="module" value="install" />
<input type="hidden" name="act" value="procInstallLicenseAggrement" />
<input type="hidden" name="license_agreement" value="Y" />
<input type="hidden" name="XE_VALIDATOR_ID" value="modules/admin/tpl/index/1">
<h2>{$lang->license_agreement}</h2>
<div>{$lang->license}</div>
<div class="x_btn-group x_pull-right" style="margin-bottom:10px">
<button type="submit" class="x_btn x_btn-small x_btn-primary" value="">{$lang->cmd_license_agree}</button>
</div>
</form>
<form action="./" method="post" class="message info x_clearfix" cond="!$isEnviromentGatheringAgreement"> <form action="./" method="post" class="message info x_clearfix" cond="!$isEnviromentGatheringAgreement">
<input type="hidden" name="module" value="admin" /> <input type="hidden" name="module" value="admin" />
<input type="hidden" name="act" value="procAdminEnviromentGatheringAgreement" /> <input type="hidden" name="act" value="procAdminEnviromentGatheringAgreement" />
@ -27,17 +44,19 @@
<button type="submit" name="is_agree" value="true" class="x_btn x_btn-small x_btn-primary">{$lang->agree}</button> <button type="submit" name="is_agree" value="true" class="x_btn x_btn-small x_btn-primary">{$lang->agree}</button>
</div> </div>
</form> </form>
<div class="message update" cond="$addTables || $needUpdate"> <div class="message update" cond="$addTables || $needUpdate">
<h2 cond="$needUpdate && $addTables">{$lang->need_update_and_table}</h2> <h2 cond="$needUpdate && $addTables">{$lang->need_update_and_table}</h2>
<h2 cond="$needUpdate && !$addTables">{$lang->need_update}</h2> <h2 cond="$needUpdate && !$addTables">{$lang->need_update}</h2>
<h2 cond="!$needUpdate && $addTables">{$lang->need_table}</h2> <h2 cond="!$needUpdate && $addTables">{$lang->need_table}</h2>
<ul> <ul>
<block loop="$module_list => $key,$value"> <block loop="$module_list => $key,$value">
<li style="margin:0 0 4px 0" cond="$value->need_install">{$value->module} - <button type="button" onclick="doInstallModule('{$value->module}')" class="x_btn x_btn-small">{$lang->cmd_create_db_table}</button></li> <li style="margin:0 0 4px 0" cond="$value->need_install">{$value->module} - <button type="button" onclick="doInstallModule('{$value->module}')" class="x_btn x_btn-small">{$lang->cmd_create_db_table}</button></li>
<li style="margin:0 0 4px 0" cond="$value->need_update">{$value->module} - <button type="button" onclick="doUpdateModule('{$value->module}')" class="x_btn x_btn-small">{$lang->cmd_module_update}</button></li> <li style="margin:0 0 4px 0" cond="$value->need_update">{$value->module} - <button type="button" onclick="doUpdateModule('{$value->module}')" class="x_btn x_btn-small">{$lang->cmd_module_update}</button></li>
</block> </block>
</ul> </ul>
</div> </div>
<div class="message update" cond="count($newVersionList)"> <div class="message update" cond="count($newVersionList)">
<h2>{$lang->available_new_version}</h2> <h2>{$lang->available_new_version}</h2>
<ul> <ul>
@ -46,7 +65,7 @@
</li> </li>
</ul> </ul>
</div> </div>
<div class="dashboard"> <div class="dashboard">
<block cond="$counterAddonActivated"> <block cond="$counterAddonActivated">
<include target="./_dashboard_counter.html" /> <include target="./_dashboard_counter.html" />

View file

@ -4,6 +4,7 @@
<permissions /> <permissions />
<actions> <actions>
<action name="dispInstallIntroduce" type="view" index="true" /> <action name="dispInstallIntroduce" type="view" index="true" />
<action name="dispInstallLicenseAgreement" type="view" />
<action name="dispInstallCheckEnv" type="view" /> <action name="dispInstallCheckEnv" type="view" />
<action name="dispInstallSelectDB" type="view" /> <action name="dispInstallSelectDB" type="view" />
<action name="dispInstallDBForm" type="view" /> <action name="dispInstallDBForm" type="view" />
@ -17,6 +18,7 @@
<action name="procSqliteDBSetting" type="controller" ruleset="sqlite" /> <action name="procSqliteDBSetting" type="controller" ruleset="sqlite" />
<action name="procConfigSetting" type="controller" ruleset="config" /> <action name="procConfigSetting" type="controller" ruleset="config" />
<action name="procInstall" type="controller" ruleset="install" /> <action name="procInstall" type="controller" ruleset="install" />
<action name="procInstallLicenseAggrement" type="controller" />
<action name="procInstallFTP" type="controller" /> <action name="procInstallFTP" type="controller" />
<action name="procInstallCheckFTP" type="controller" /> <action name="procInstallCheckFTP" type="controller" />
<action name="procInstallAdminInstall" type="controller" /> <action name="procInstallAdminInstall" type="controller" />

View file

@ -9,6 +9,7 @@ class installController extends install
{ {
var $db_tmp_config_file = ''; var $db_tmp_config_file = '';
var $etc_tmp_config_file = ''; var $etc_tmp_config_file = '';
var $flagLicenseAgreement = './files/env/license_agreement';
/** /**
* @brief Initialization * @brief Initialization
@ -377,6 +378,33 @@ class installController extends install
return $install_enable; 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 * check this server can use rewrite module
* make a file to files/config and check url approach by ".htaccess" rules * make a file to files/config and check url approach by ".htaccess" rules

View file

@ -79,6 +79,17 @@ class installView extends install
$this->setTemplateFile('introduce'); $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 * @brief Display messages about installation environment
*/ */

View file

@ -31,6 +31,10 @@
<value xml:lang="tr"><![CDATA[Yükleme dilini seçin]]></value> <value xml:lang="tr"><![CDATA[Yükleme dilini seçin]]></value>
<value xml:lang="vi"><![CDATA[Chọn ngôn ngữ cài đặt]]></value> <value xml:lang="vi"><![CDATA[Chọn ngôn ngữ cài đặt]]></value>
</item> </item>
<item name="license_agreement">
<value xml:lang="ko"><![CDATA[사용권 동의]]></value>
<value xml:lang="en"><![CDATA[License agreement]]></value>
</item>
<item name="condition"> <item name="condition">
<value xml:lang="ko"><![CDATA[설치 조건 확인]]></value> <value xml:lang="ko"><![CDATA[설치 조건 확인]]></value>
<value xml:lang="en"><![CDATA[Check the installation conditions]]></value> <value xml:lang="en"><![CDATA[Check the installation conditions]]></value>

View file

@ -34,9 +34,10 @@
<block cond="$use_nginx == 'Y'"><br> {$lang->about_nginx_rewrite}</block> <block cond="$use_nginx == 'Y'"><br> {$lang->about_nginx_rewrite}</block>
</p> </p>
</div> </div>
<div class="ibtnArea"> <div class="ibtnArea">
<span class="x_pull-left"> <span class="x_pull-left">
<a href="{getUrl('')}" class="x_btn x_btn-small x_btn-inverse"><i class="x_icon-chevron-left x_icon-white"></i> {$lang->cmd_back}</a> <a href="{getUrl('', 'act','dispInstallLicenseAgreement')}" class="x_btn x_btn-small x_btn-inverse"><i class="x_icon-chevron-left x_icon-white"></i> {$lang->cmd_back}</a>
</span> </span>
<span class="x_pull-right"> <span class="x_pull-right">
<a cond="$install_enable" class="x_btn x_btn-small x_btn-inverse" id="task-checklist-confirm" href="{getUrl('','act','dispInstallSelectDB')}">{$lang->cmd_install_next} <i class="x_icon-chevron-right x_icon-white"></i></a> <a cond="$install_enable" class="x_btn x_btn-small x_btn-inverse" id="task-checklist-confirm" href="{getUrl('','act','dispInstallSelectDB')}">{$lang->cmd_install_next} <i class="x_icon-chevron-right x_icon-white"></i></a>

View file

@ -12,7 +12,7 @@
</ul> </ul>
<div class="ibtnArea"> <div class="ibtnArea">
<span class="x_pull-right"> <span class="x_pull-right">
<a href="{getUrl('', 'act', 'dispInstallCheckEnv')}" class="x_btn x_btn-small x_btn-inverse" id="task-choose-language">{$lang->cmd_next} <i class="x_icon-chevron-right x_icon-white"></i></a> <a href="{getUrl('', 'act', 'dispInstallLicenseAgreement')}" class="x_btn x_btn-small x_btn-inverse" id="task-choose-language">{$lang->cmd_next} <i class="x_icon-chevron-right x_icon-white"></i></a>
</span> </span>
</div> </div>
</div> </div>

View file

@ -0,0 +1,35 @@
<load target="js/install_admin.js" />
<include target="header.html" />
<div id="body">
<include target="progress_menu.html" />
<div id="content">
<div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
<p>{$XE_VALIDATOR_MESSAGE}</p>
</div>
<h2>{$lang->license_agreement}</h2>
<form action="./" method="post" class="x_form-horizontal">
<input type="hidden" name="act" value="procInstallLicenseAggrement">
<input type="hidden" name="module" value="install">
<div class="content-license">
<div>{$lang->license}</div>
</div>
<div>
<label><input type="checkbox" name="license_agreement" value="Y" /> <strong>{$lang->cmd_license_agree}</strong></label>
</div>
<div class="ibtnArea">
<span class="x_pull-left">
<a href="/core-origin/" class="x_btn x_btn-small x_btn-inverse"><i class="x_icon-chevron-left x_icon-white"></i> {$lang->cmd_back}</a>
</span>
<span class="x_pull-right">
<button type="submit" class="x_btn x_btn-small x_btn-inverse" id="task-license-aggrement" value="">{$lang->cmd_next} <i class="x_icon-chevron-right x_icon-white"></i></button>
</span>
</div>
</form>
</div>
</div>
<include target="footer.html" />

View file

@ -1,6 +1,7 @@
<div id="progress"> <div id="progress">
<ul> <ul>
<li class="active"|cond="$act==''">{$lang->install_progress_menu['language']}</li> <li class="active"|cond="$act==''">{$lang->install_progress_menu['language']}</li>
<li class="active"|cond="$act=='dispInstallLicenseAgreement'">{$lang->install_progress_menu['license_agreement']}</li>
<li class="active"|cond="$act=='dispInstallCheckEnv'">{$lang->install_progress_menu['condition']}</li> <li class="active"|cond="$act=='dispInstallCheckEnv'">{$lang->install_progress_menu['condition']}</li>
<li class="active"|cond="$act=='dispInstallSelectDB' && $progressMenu == '3'">{$lang->install_progress_menu['ftp']}</li> <li class="active"|cond="$act=='dispInstallSelectDB' && $progressMenu == '3'">{$lang->install_progress_menu['ftp']}</li>
<li class="active"|cond="$act=='dispInstallSelectDB' && $progressMenu == '4'">{$lang->install_progress_menu['dbSelect']}</li> <li class="active"|cond="$act=='dispInstallSelectDB' && $progressMenu == '4'">{$lang->install_progress_menu['dbSelect']}</li>