mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +09:00
issue 2604 checked rewrite module when checked environment.
git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@11803 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
cfc86f9b52
commit
e200199cd9
5 changed files with 33 additions and 4 deletions
|
|
@ -182,6 +182,8 @@
|
|||
// Display a message that installation is completed
|
||||
$this->setMessage('msg_install_completed');
|
||||
|
||||
unset($_SESSION['use_rewrite']);
|
||||
|
||||
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) {
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('');
|
||||
header('location:'.$returnUrl);
|
||||
|
|
|
|||
|
|
@ -58,6 +58,10 @@
|
|||
* @brief Display messages about installation environment
|
||||
**/
|
||||
function dispInstallCheckEnv() {
|
||||
$useRewrite = $this->useRewriteModule() ? 'Y' : 'N';
|
||||
$_SESSION['use_rewrite'] = $useRewrite;
|
||||
Context::set('use_rewrite', $useRewrite);
|
||||
|
||||
$this->setTemplateFile('check_env');
|
||||
}
|
||||
|
||||
|
|
@ -100,11 +104,27 @@
|
|||
|
||||
include _XE_PATH_.'files/config/tmpDB.config.php';
|
||||
|
||||
Context::set('use_rewrite', $_SESSION['use_rewrite']);
|
||||
Context::set('time_zone', $GLOBALS['time_zone']);
|
||||
Context::set('db_type', $db_info->db_type);
|
||||
$this->setTemplateFile('config_form');
|
||||
}
|
||||
|
||||
function useRewriteModule()
|
||||
{
|
||||
if(function_exists('apache_get_modules') && in_array('mod_rewrite',apache_get_modules()))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
require_once(_XE_PATH_.'classes/httprequest/XEHttpRequest.class.php');
|
||||
$httpRequest = new XEHttpRequest($_SERVER['HTTP_HOST'], $_SERVER['SERVER_PORT']);
|
||||
$xeInstallPath = substr($_SERVER['REQUEST_URI'], 0, strpos($_SERVER['REQUEST_URI'], 'index.php', 1));
|
||||
$output = $httpRequest->send($xeInstallPath.'modules/install/conf/info.xml');
|
||||
|
||||
return (strpos($output->body, '<?xml') !== 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Display a screen to enter DB and administrator's information
|
||||
**/
|
||||
|
|
|
|||
|
|
@ -628,6 +628,10 @@
|
|||
<value xml:lang="tr"><![CDATA[Eğer websunucusu yenidenyazma(rewritemod) destekliyorsa, http://ornek/?dosya_no=123 gibi URLler http://ornek/123 olarak kısaltılabilir]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Nếu Host của bạn hỗ trợ Mod Rewrite, khi địa chỉ có dạng <b>http://blah/?document_srl=123</b> sẽ được rút ngắn thành <b>http://blah/123</b>]]></value>
|
||||
</item>
|
||||
<item name="disable_rewrite">
|
||||
<value xml:lang="ko"><![CDATA[짧은 주소를 사용할 수 없습니다. 웹 서버 담당자에게 <strong>rewrite_mod</strong>지원 여부를 확인하시기 바랍니다.]]></value>
|
||||
<value xml:lang="en"><![CDATA[Required module for "Friendly URL" feature is not found. Please check with the web master about <strong>rewrite_mod</strong> module support.]]></value>
|
||||
</item>
|
||||
<item name="time_zone">
|
||||
<value xml:lang="ko"><![CDATA[표준 시간대]]></value>
|
||||
<value xml:lang="en"><![CDATA[Time Zone]]></value>
|
||||
|
|
|
|||
|
|
@ -25,6 +25,12 @@
|
|||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div cond="$use_rewrite == 'N'">
|
||||
<p>
|
||||
<i class="x_icon-ok-sign x_icon-white"></i>
|
||||
{$lang->disable_rewrite}
|
||||
</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>
|
||||
|
|
|
|||
|
|
@ -8,10 +8,7 @@
|
|||
</div>
|
||||
<form action="./" method="post">
|
||||
<input type="hidden" name="act" value="procConfigSetting" />
|
||||
<div class="x_control-group">
|
||||
<label for="rewrite"><input name="use_rewrite" value="Y" checked="checked"|cond="function_exists('apache_get_modules')&&in_array('mod_rewrite',apache_get_modules())" type="checkbox" id="rewrite" /> {$lang->use_rewrite}</label>
|
||||
<p>{$lang->about_rewrite}</p>
|
||||
</div>
|
||||
<input type="hidden" name="use_rewrite" value="{$use_rewrite}" />
|
||||
<div class="x_control-group">
|
||||
<select name="time_zone" style="width:100%">
|
||||
<option loop="$time_zone => $key,$val" id="{$key}" value="{$key}" selected="selected"|cond="$key==date('O')">{$val}</option>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue