Skip to content

Commit

Permalink
#1051 license 동의 절차 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
bnu committed Dec 1, 2014
1 parent 8f0056b commit e3e1bab
Show file tree
Hide file tree
Showing 12 changed files with 136 additions and 14 deletions.
16 changes: 16 additions & 0 deletions common/lang/lang.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3917,4 +3917,20 @@
<value xml:lang="en"><![CDATA[Default url is null.]]></value>
<value xml:lang="jp"><![CDATA[基本URLが設定されていません。]]></value>
</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>
7 changes: 2 additions & 5 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down
12 changes: 10 additions & 2 deletions modules/admin/admin.admin.view.php
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,16 @@ function dispAdminIndex()
$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');
Expand Down Expand Up @@ -515,7 +525,6 @@ function showSendEnv()
$img = sprintf('<img src="%s" alt="" style="height:0px;width:0px" />', $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)))
Expand All @@ -528,7 +537,6 @@ function showSendEnv()
Context::addHtmlFooter($img);
}

FileHandler::removeDir($path);
FileHandler::writeFile($path . $mainVersion, '1');
unset($_SESSION['enviroment_gather']);
}
Expand Down
29 changes: 24 additions & 5 deletions modules/admin/tpl/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,29 @@
<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>
</div>

<div id="checkBrowserMessage" class="message error" style="display:none;">
<h2>{$lang->checkBrowserIE8}</h2>
</div>

<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/admin/tpl/index/1'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
<p>{$XE_VALIDATOR_MESSAGE}</p>
</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">
<input type="hidden" name="module" value="admin" />
<input type="hidden" name="act" value="procAdminEnviromentGatheringAgreement" />
Expand All @@ -27,17 +44,19 @@ <h2>{$lang->install_env_agreement}</h2>
<button type="submit" name="is_agree" value="true" class="x_btn x_btn-small x_btn-primary">{$lang->agree}</button>
</div>
</form>

<div class="message update" cond="$addTables || $needUpdate">
<h2 cond="$needUpdate && $addTables">{$lang->need_update_and_table}</h2>
<h2 cond="$needUpdate && !$addTables">{$lang->need_update}</h2>
<h2 cond="!$needUpdate && $addTables">{$lang->need_table}</h2>
<ul>
<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_update">{$value->module} - <button type="button" onclick="doUpdateModule('{$value->module}')" class="x_btn x_btn-small">{$lang->cmd_module_update}</button></li>
</block>
<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_update">{$value->module} - <button type="button" onclick="doUpdateModule('{$value->module}')" class="x_btn x_btn-small">{$lang->cmd_module_update}</button></li>
</block>
</ul>
</div>

<div class="message update" cond="count($newVersionList)">
<h2>{$lang->available_new_version}</h2>
<ul>
Expand All @@ -46,7 +65,7 @@ <h2>{$lang->available_new_version}</h2>
</li>
</ul>
</div>

<div class="dashboard">
<block cond="$counterAddonActivated">
<include target="./_dashboard_counter.html" />
Expand Down
2 changes: 2 additions & 0 deletions modules/install/conf/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<permissions />
<actions>
<action name="dispInstallIntroduce" type="view" index="true" />
<action name="dispInstallLicenseAgreement" type="view" />
<action name="dispInstallCheckEnv" type="view" />
<action name="dispInstallSelectDB" type="view" />
<action name="dispInstallDBForm" type="view" />
Expand All @@ -17,6 +18,7 @@
<action name="procSqliteDBSetting" type="controller" ruleset="sqlite" />
<action name="procConfigSetting" type="controller" ruleset="config" />
<action name="procInstall" type="controller" ruleset="install" />
<action name="procInstallLicenseAggrement" type="controller" />
<action name="procInstallFTP" type="controller" />
<action name="procInstallCheckFTP" type="controller" />
<action name="procInstallAdminInstall" type="controller" />
Expand Down
28 changes: 28 additions & 0 deletions modules/install/install.controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -377,6 +378,33 @@ function checkInstallEnv()
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
Expand Down
11 changes: 11 additions & 0 deletions modules/install/install.view.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,17 @@ function dispInstallIntroduce()
$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
*/
Expand Down
4 changes: 4 additions & 0 deletions modules/install/lang/lang.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@
<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>
</item>
<item name="license_agreement">
<value xml:lang="ko"><![CDATA[사용권 동의]]></value>
<value xml:lang="en"><![CDATA[License agreement]]></value>
</item>
<item name="condition">
<value xml:lang="ko"><![CDATA[설치 조건 확인]]></value>
<value xml:lang="en"><![CDATA[Check the installation conditions]]></value>
Expand Down
3 changes: 2 additions & 1 deletion modules/install/tpl/check_env.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@
<block cond="$use_nginx == 'Y'"><br> {$lang->about_nginx_rewrite}</block>
</p>
</div>

<div class="ibtnArea">
<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 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>
Expand Down
2 changes: 1 addition & 1 deletion modules/install/tpl/introduce.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</ul>
<div class="ibtnArea">
<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>
</div>
</div>
Expand Down
35 changes: 35 additions & 0 deletions modules/install/tpl/license_agreement.html
Original file line number Diff line number Diff line change
@@ -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>

This comment has been minimized.

Copy link
@YJSoft

YJSoft Dec 1, 2014

Contributor

href="/core-origin/"
href값이 잘못된것 같습니다.

</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" />
1 change: 1 addition & 0 deletions modules/install/tpl/progress_menu.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<div id="progress">
<ul>
<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=='dispInstallSelectDB' && $progressMenu == '3'">{$lang->install_progress_menu['ftp']}</li>
<li class="active"|cond="$act=='dispInstallSelectDB' && $progressMenu == '4'">{$lang->install_progress_menu['dbSelect']}</li>
Expand Down

0 comments on commit e3e1bab

Please sign in to comment.