Merge branch 'release/1.7.8' into develop

Conflicts:
	classes/context/Context.class.php
	config/config.inc.php
This commit is contained in:
bnu 2014-12-09 15:13:08 +09:00
commit 4506ea440e
50 changed files with 4086 additions and 126 deletions

View file

@ -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" />
@ -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" />

View file

@ -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
@ -389,26 +417,26 @@ class installController extends install
FileHandler::writeFile(_XE_PATH_.$checkFilePath, trim($checkString));
$scheme = $_SERVER['REQUEST_SCHEME'];
$hostname = $_SERVER['SERVER_NAME'];
$port = $_SERVER['SERVER_PORT'];
$str_port = '';
if($port)
{
$str_port = ':' . $port;
}
$query = "/JUST/CHECK/REWRITE/" . $checkFilePath;
$currentPath = str_replace($_SERVER['DOCUMENT_ROOT'], "", _XE_PATH_);
if($currentPath != "")
{
$query = $currentPath . $query;
}
$requestUrl = sprintf('%s://%s%s%s', $scheme, $hostname, $str_port, $query);
$requestConfig = array();
$requestConfig['ssl_verify_peer'] = false;
$buff = FileHandler::getRemoteResource($requestUrl, null, 10, 'POST', 'application/x-www-form-urlencoded', array(), array(), array(), $requestConfig);
$fp = @fsockopen($hostname, $port, $errno, $errstr, 5);
if(!$fp) return false;
fputs($fp, "GET {$query} HTTP/1.0\r\n");
fputs($fp, "Host: {$hostname}\r\n\r\n");
$buff = '';
while(!feof($fp)) {
$str = fgets($fp, 1024);
if(trim($str)=='') $start = true;
if($start) $buff .= $str;
}
fclose($fp);
FileHandler::removeFile(_XE_PATH_.$checkFilePath);

View file

@ -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
*/
@ -145,19 +156,6 @@ class installView extends install
$title = sprintf(Context::getLang('input_dbinfo_by_dbtype'), Context::get('db_type'));
Context::set('title', $title);
$error_return_url = getNotEncodedUrl('', 'act', Context::get('act'), 'db_type', Context::get('db_type'));
if($_SERVER['HTTPS'] == 'on')
{
// Error occured when using https protocol at "ModuleHandler::init() '
$parsedUrl = parse_url($error_return_url);
$error_return_url = '';
if(isset($parsedUrl['path'])) $error_return_url .= $parsedUrl['path'];
if(isset($parsedUrl['query'])) $error_return_url .= '?' . $parsedUrl['query'];
if(isset($parsedUrl['fragment'])) $error_return_url .= '?' . $parsedUrl['fragment'];
}
Context::set('error_return_url', $error_return_url);
$this->setTemplateFile($tpl_filename);
}

View file

@ -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>

View file

@ -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>

View file

@ -7,7 +7,7 @@
<p>{$XE_VALIDATOR_MESSAGE}</p>
</div>
<form rule="cubrid" action="./" method="post" class="x_form-horizontal">
<input type="hidden" value="{$error_return_url}" name="error_return_url">
<input type="hidden" value="{getUrl('', 'act', $act, 'db_type', $db_type)}" name="error_return_url">
<input type="hidden" name="act" value="procCubridDBSetting" />
<input type="hidden" name="db_type" value="{$db_type}" />
<h2>{$title}</h2>

View file

@ -7,7 +7,7 @@
<p>{$XE_VALIDATOR_MESSAGE}</p>
</div>
<form rule="mssql" action="./" method="post" class="x_form-horizontal">
<input type="hidden" value="{$error_return_url}" name="error_return_url">
<input type="hidden" value="{getUrl('', 'act', $act, 'db_type', $db_type)}" name="error_return_url">
<input type="hidden" name="act" value="procMssqlDBSetting" />
<input type="hidden" name="db_type" value="{$db_type}" />
<h2>{$title}</h2>

View file

@ -7,7 +7,7 @@
<p>{$XE_VALIDATOR_MESSAGE}</p>
</div>
<form rule="mysql" action="./" method="post" class="x_form-horizontal">
<input type="hidden" value="{$error_return_url}" name="error_return_url">
<input type="hidden" value="{getUrl('', 'act', $act, 'db_type', $db_type)}" name="error_return_url">
<input type="hidden" name="act" value="procMysqlDBSetting" />
<input type="hidden" name="db_type" value="{$db_type}" />
<h2>{$title}</h2>

View file

@ -7,7 +7,7 @@
<p>{$XE_VALIDATOR_MESSAGE}</p>
</div>
<form rule="mysql" action="./" method="post" class="x_form-horizontal">
<input type="hidden" value="{$error_return_url}" name="error_return_url">
<input type="hidden" value="{getUrl('', 'act', $act, 'db_type', $db_type)}" name="error_return_url">
<input type="hidden" name="act" value="procMysqlDBSetting" />
<input type="hidden" name="db_type" value="{$db_type}" />
<h2>{$title}</h2>

View file

@ -7,7 +7,7 @@
<p>{$XE_VALIDATOR_MESSAGE}</p>
</div>
<form rule="mysql" action="./" method="post" class="x_form-horizontal">
<input type="hidden" value="{$error_return_url}" name="error_return_url">
<input type="hidden" value="{getUrl('', 'act', $act, 'db_type', $db_type)}" name="error_return_url">
<input type="hidden" name="act" value="procMysqlDBSetting" />
<input type="hidden" name="db_type" value="{$db_type}" />
<h2>{$title}</h2>

View file

@ -7,7 +7,7 @@
<p>{$XE_VALIDATOR_MESSAGE}</p>
</div>
<form rule="mysql" action="./" method="post" class="x_form-horizontal">
<input type="hidden" value="{$error_return_url}" name="error_return_url">
<input type="hidden" value="{getUrl('', 'act', $act, 'db_type', $db_type)}" name="error_return_url">
<input type="hidden" name="act" value="procMysqlDBSetting" />
<input type="hidden" name="db_type" value="{$db_type}" />
<h2>{$title}</h2>

View file

@ -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>

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="{getUrl('', 'act','')}" 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">
<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>