mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-29 08:09:58 +09:00
Clean up environment check in install module
This commit is contained in:
parent
f5fcc00aa5
commit
ca9d10ac21
4 changed files with 104 additions and 56 deletions
|
|
@ -339,39 +339,88 @@ class installController extends install
|
||||||
{
|
{
|
||||||
// Check each item
|
// Check each item
|
||||||
$checklist = array();
|
$checklist = array();
|
||||||
// 0. check your version of php (5.2.4 or higher)
|
|
||||||
|
// 0. Check PHP version
|
||||||
$checklist['php_version'] = true;
|
$checklist['php_version'] = true;
|
||||||
if(version_compare(PHP_VERSION, __XE_MIN_PHP_VERSION__, '<'))
|
if(version_compare(PHP_VERSION, __XE_MIN_PHP_VERSION__, '<'))
|
||||||
{
|
{
|
||||||
$checklist['php_version'] = false;
|
$checklist['php_version'] = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(version_compare(PHP_VERSION, __XE_RECOMMEND_PHP_VERSION__, '<'))
|
if(version_compare(PHP_VERSION, __XE_RECOMMEND_PHP_VERSION__, '<'))
|
||||||
{
|
{
|
||||||
Context::set('phpversion_warning', true);
|
Context::set('phpversion_warning', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 1. Check permission
|
// 1. Check permission
|
||||||
if(is_writable('./')||is_writable('./files')) $checklist['permission'] = true;
|
if(is_writable('./')||is_writable('./files'))
|
||||||
else $checklist['permission'] = false;
|
{
|
||||||
// 2. Check if xml_parser_create exists
|
$checklist['permission'] = true;
|
||||||
if(function_exists('xml_parser_create')) $checklist['xml'] = true;
|
}
|
||||||
else $checklist['xml'] = false;
|
else
|
||||||
// 3. Check if ini_get (session.auto_start) == 1
|
{
|
||||||
if(ini_get('session.auto_start')!=1) $checklist['session'] = true;
|
$checklist['permission'] = false;
|
||||||
else $checklist['session'] = false;
|
}
|
||||||
// 4. Check if iconv exists
|
|
||||||
if(function_exists('iconv')) $checklist['iconv'] = true;
|
|
||||||
else $checklist['iconv'] = false;
|
|
||||||
// 5. Check gd(imagecreatefromgif function)
|
|
||||||
if(function_exists('imagecreatefromgif')) $checklist['gd'] = true;
|
|
||||||
else $checklist['gd'] = false;
|
|
||||||
// 6. Check DB
|
|
||||||
if(DB::getEnableList()) $checklist['db'] = true;
|
|
||||||
else $checklist['db'] = false;
|
|
||||||
|
|
||||||
if(!$checklist['php_version'] || !$checklist['permission'] || !$checklist['xml'] || !$checklist['session'] || !$checklist['db']) $install_enable = false;
|
// 2. Check if ini_get (session.auto_start) == 1
|
||||||
else $install_enable = true;
|
if(ini_get('session.auto_start') != 1)
|
||||||
|
{
|
||||||
|
$checklist['session'] = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$checklist['session'] = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 3. Check if xml_parser_create exists
|
||||||
|
if(function_exists('xml_parser_create'))
|
||||||
|
{
|
||||||
|
$checklist['xml'] = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$checklist['xml'] = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 4. Check if iconv exists
|
||||||
|
if(function_exists('iconv'))
|
||||||
|
{
|
||||||
|
$checklist['iconv'] = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$checklist['iconv'] = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 5. Check GD
|
||||||
|
if(function_exists('imagecreatefromgif'))
|
||||||
|
{
|
||||||
|
$checklist['gd'] = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$checklist['gd'] = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 6. Check DB
|
||||||
|
if(DB::getEnableList())
|
||||||
|
{
|
||||||
|
$checklist['db'] = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$checklist['db'] = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Enable install if all conditions are met
|
||||||
|
$install_enable = true;
|
||||||
|
foreach($checklist as $k => $v)
|
||||||
|
{
|
||||||
|
if (!$v)
|
||||||
|
{
|
||||||
|
$install_enable = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Save the checked result to the Context
|
// Save the checked result to the Context
|
||||||
Context::set('checklist', $checklist);
|
Context::set('checklist', $checklist);
|
||||||
|
|
|
||||||
|
|
@ -86,6 +86,11 @@
|
||||||
<value xml:lang="en"><![CDATA[You can Install.]]></value>
|
<value xml:lang="en"><![CDATA[You can Install.]]></value>
|
||||||
<value xml:lang="jp"><![CDATA[インストールできます。]]></value>
|
<value xml:lang="jp"><![CDATA[インストールできます。]]></value>
|
||||||
</item>
|
</item>
|
||||||
|
<item name="install_condition_disable">
|
||||||
|
<value xml:lang="ko"><![CDATA[설치할 수 없습니다.]]></value>
|
||||||
|
<value xml:lang="en"><![CDATA[You cannot install XE.]]></value>
|
||||||
|
<value xml:lang="jp"><![CDATA[インストールできません。]]></value>
|
||||||
|
</item>
|
||||||
<item name="install_details">
|
<item name="install_details">
|
||||||
<value xml:lang="ko"><![CDATA[자세히]]></value>
|
<value xml:lang="ko"><![CDATA[자세히]]></value>
|
||||||
<value xml:lang="en"><![CDATA[Details]]></value>
|
<value xml:lang="en"><![CDATA[Details]]></value>
|
||||||
|
|
@ -641,13 +646,13 @@
|
||||||
</item>
|
</item>
|
||||||
<item name="use_rewrite">
|
<item name="use_rewrite">
|
||||||
<value xml:lang="ko"><![CDATA[짧은 주소 사용]]></value>
|
<value xml:lang="ko"><![CDATA[짧은 주소 사용]]></value>
|
||||||
<value xml:lang="en"><![CDATA[Rewrite Mod]]></value>
|
<value xml:lang="en"><![CDATA[mod_rewrite]]></value>
|
||||||
<value xml:lang="jp"><![CDATA[リライト・モジュールを使用]]></value>
|
<value xml:lang="jp"><![CDATA[リライト・モジュールを使用]]></value>
|
||||||
<value xml:lang="zh-CN"><![CDATA[使用rewrite模块]]></value>
|
<value xml:lang="zh-CN"><![CDATA[使用rewrite模块]]></value>
|
||||||
<value xml:lang="zh-TW"><![CDATA[Rewrite]]></value>
|
<value xml:lang="zh-TW"><![CDATA[Rewrite]]></value>
|
||||||
<value xml:lang="fr"><![CDATA[Utiliser mode de récrire(rewrite mod)]]></value>
|
<value xml:lang="fr"><![CDATA[Utiliser mode de récrire(mod_rewrite)]]></value>
|
||||||
<value xml:lang="ru"><![CDATA[Использовать<br /> модуль перезаписи<br />(rewrite mod)]]></value>
|
<value xml:lang="ru"><![CDATA[Использовать<br /> модуль перезаписи<br />(mod_rewrite)]]></value>
|
||||||
<value xml:lang="es"><![CDATA[Usar rewrite mod]]></value>
|
<value xml:lang="es"><![CDATA[Usar mod_rewrite]]></value>
|
||||||
<value xml:lang="tr"><![CDATA[YenidenYazma Modu (mod_rewrite)]]></value>
|
<value xml:lang="tr"><![CDATA[YenidenYazma Modu (mod_rewrite)]]></value>
|
||||||
<value xml:lang="vi"><![CDATA[Mod Rewrite]]></value>
|
<value xml:lang="vi"><![CDATA[Mod Rewrite]]></value>
|
||||||
</item>
|
</item>
|
||||||
|
|
@ -664,21 +669,21 @@
|
||||||
<value xml:lang="vi"><![CDATA[<abbr title="Single Sign On">SSO</abbr>]]></value>
|
<value xml:lang="vi"><![CDATA[<abbr title="Single Sign On">SSO</abbr>]]></value>
|
||||||
</item>
|
</item>
|
||||||
<item name="about_rewrite">
|
<item name="about_rewrite">
|
||||||
<value xml:lang="ko"><![CDATA[이 기능을 사용하면 <em>http://yourdomain/</em><strong>?document_srl=123</strong> 과 같이 복잡한 주소를 <em>http://yourdomain/</em><strong>123</strong> 과 같이 간단하게 줄일 수 있습니다. 웹 서버에서 <strong>rewrite_mod</strong>를 지원해야 합니다. 지원 여부는 서버 관리자에게 문의하세요.]]></value>
|
<value xml:lang="ko"><![CDATA[이 기능을 사용하면 <em>http://yourdomain/</em><strong>?document_srl=123</strong> 과 같이 복잡한 주소를 <em>http://yourdomain/</em><strong>123</strong> 과 같이 간단하게 줄일 수 있습니다. 웹 서버에서 <strong>mod_rewrite</strong>를 지원해야 합니다. 지원 여부는 서버 관리자에게 문의하세요.]]></value>
|
||||||
<value xml:lang="en"><![CDATA[If web server provides rewrite mod, long URL such as <em>http://blah/</em><strong>?document_srl=123</strong> can be shortened like <em>http://blah/</em><strong>123</strong>]]></value>
|
<value xml:lang="en"><![CDATA[If web server provides mod_rewrite, long URL such as <em>http://blah/</em><strong>?document_srl=123</strong> can be shortened like <em>http://blah/</em><strong>123</strong>]]></value>
|
||||||
<value xml:lang="jp"><![CDATA[Webサーバで「リライト・モジュール(mod_rewrite)」をサポートしている場合は、「http://アドレス/?document_srl=123」のようなアドレスを、動的だけど「http://アドレス/123」のように静的なページに見せることができます。]]></value>
|
<value xml:lang="jp"><![CDATA[Webサーバで「リライト・モジュール(mod_rewrite)」をサポートしている場合は、「http://アドレス/?document_srl=123」のようなアドレスを、動的だけど「http://アドレス/123」のように静的なページに見せることができます。]]></value>
|
||||||
<value xml:lang="zh-CN"><![CDATA[如服务器支持rewrite模块且选择此项,可以简化复杂的网址。<br />例如,http://域名/?document_srl=123简化为http://域名/123。]]></value>
|
<value xml:lang="zh-CN"><![CDATA[如服务器支持rewrite模块且选择此项,可以简化复杂的网址。<br />例如,http://域名/?document_srl=123简化为http://域名/123。]]></value>
|
||||||
<value xml:lang="zh-TW"><![CDATA[如果支援 rewrite 功能,可縮短冗長的網址。<br />例>『http://域名/?document_srl=123』縮短成『http://域名/123』。]]></value>
|
<value xml:lang="zh-TW"><![CDATA[如果支援 rewrite 功能,可縮短冗長的網址。<br />例>『http://域名/?document_srl=123』縮短成『http://域名/123』。]]></value>
|
||||||
<value xml:lang="fr"><![CDATA[Si le serveur de web est capable d'utiliser le mode de récrire, URL longue comme http://murmure/?document_srl=123 peut être abrégé comme http://murmure/123]]></value>
|
<value xml:lang="fr"><![CDATA[Si le serveur de web est capable d'utiliser le mode de récrire, URL longue comme http://murmure/?document_srl=123 peut être abrégé comme http://murmure/123]]></value>
|
||||||
<value xml:lang="ru"><![CDATA[Если сервер предлагает rewrite mod, длинные URL такие как http://blah/?document_srl=123 могут быть сокращены до http://blah/123]]></value>
|
<value xml:lang="ru"><![CDATA[Если сервер предлагает mod_rewrite, длинные URL такие как http://blah/?document_srl=123 могут быть сокращены до http://blah/123]]></value>
|
||||||
<value xml:lang="es"><![CDATA[Si el servidor de la web soporte rewrite mod, URL largas como http://bla/?documento_srl=123 puede abreviarse como http://bla/123]]></value>
|
<value xml:lang="es"><![CDATA[Si el servidor de la web soporte mod_rewrite, URL largas como http://bla/?documento_srl=123 puede abreviarse como http://bla/123]]></value>
|
||||||
<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="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>
|
<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>
|
||||||
<item name="disable_rewrite">
|
<item name="disable_rewrite">
|
||||||
<value xml:lang="ko"><![CDATA[짧은 주소를 사용할 수 없습니다. 웹 서버 담당자에게 <strong>rewrite_mod</strong>지원 여부를 확인 바랍니다.]]></value>
|
<value xml:lang="ko"><![CDATA[짧은 주소를 사용할 수 없습니다. 웹 서버 담당자에게 <strong>mod_rewrite</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>
|
<value xml:lang="en"><![CDATA[Required module for "Friendly URL" feature is not found. Please check with the web master about <strong>mod_rewrite</strong> module support.]]></value>
|
||||||
<value xml:lang="jp"><![CDATA[短縮アドレスを使用できません。ウェブサーバー担当者に <strong>rewrite_mod</strong>サポート可否を確認してください。]]></value>
|
<value xml:lang="jp"><![CDATA[短縮アドレスを使用できません。ウェブサーバー担当者に <strong>mod_rewrite</strong>サポート可否を確認してください。]]></value>
|
||||||
</item>
|
</item>
|
||||||
<item name="about_nginx_rewrite">
|
<item name="about_nginx_rewrite">
|
||||||
<value xml:lang="ko"><![CDATA[Nginx를 사용할 경우, 짧은 주소를 사용하기 위하여 rewrite 설정이 필요합니다. 설정방법은 <a href="https://github.com/xpressengine/xe-core/wiki/Nginx-rewite-%EC%84%A4%EC%A0%95%ED%95%98%EA%B8%B0" target="_blank"><strong>여기</strong></a>를 참고하세요.]]></value>
|
<value xml:lang="ko"><![CDATA[Nginx를 사용할 경우, 짧은 주소를 사용하기 위하여 rewrite 설정이 필요합니다. 설정방법은 <a href="https://github.com/xpressengine/xe-core/wiki/Nginx-rewite-%EC%84%A4%EC%A0%95%ED%95%98%EA%B8%B0" target="_blank"><strong>여기</strong></a>를 참고하세요.]]></value>
|
||||||
|
|
|
||||||
|
|
@ -2,39 +2,31 @@
|
||||||
<div id="body">
|
<div id="body">
|
||||||
<include target="progress_menu.html" />
|
<include target="progress_menu.html" />
|
||||||
<div id="content">
|
<div id="content">
|
||||||
<ul>
|
<p cond="$install_enable">
|
||||||
<li loop="$checklist => $key,$val" cond="!$val">
|
<i class="x_icon-ok-sign x_icon-white"></i>
|
||||||
{@ $isDisable = TRUE}
|
<strong>XE {__XE_VERSION__}</strong> {$lang->install_condition_enable}
|
||||||
<strong>{$lang->install_checklist_title[$key]}<block cond="$key == 'php_version'">(Ver. {$phpversion})</block></strong>
|
</p>
|
||||||
|
<p cond="!$install_enable">
|
||||||
|
<i class="x_icon-ban-circle x_icon-white"></i>
|
||||||
|
<strong>XE {__XE_VERSION__}</strong> {$lang->install_condition_disable}
|
||||||
|
</p>
|
||||||
|
<ul id="details">
|
||||||
|
<li loop="$checklist => $key,$val">
|
||||||
|
<strong>{$lang->install_checklist_title[$key]}</strong>
|
||||||
:
|
:
|
||||||
<em><i class="x_icon-ban-circle x_icon-white"></i> {$lang->disable}</em>
|
<em cond="$val" class="ok">{$lang->enable} <block cond="$key == 'php_version'">({$phpversion})</block></em>
|
||||||
<p>{sprintf($lang->install_checklist_desc[$key], __XE_MIN_PHP_VERSION__)}</p>
|
<em cond="!$val" class="error">{$lang->disable} <block cond="$key == 'php_version'">({$phpversion})</block></em>
|
||||||
<p cond="$key == 'php_version' && $phpversion_warning === true">
|
<p cond="$key == 'php_version' && $phpversion_warning === true">
|
||||||
{sprintf($lang->install_checklist_desc['php_version_warning'], __XE_RECOMMEND_PHP_VERSION__)} <a href="https://secure.php.net/supported-versions.php" target="_blank">[{$lang->more}]</a>
|
{sprintf($lang->install_checklist_desc['php_version_warning'], __XE_RECOMMEND_PHP_VERSION__)} <a href="https://secure.php.net/supported-versions.php" target="_blank">[{$lang->more}]</a>
|
||||||
</p>
|
</p>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div cond="!$isDisable">
|
|
||||||
<p>
|
|
||||||
<i class="x_icon-ok-sign x_icon-white"></i>
|
|
||||||
<strong>XE {__XE_VERSION__}</strong> {$lang->install_condition_enable}
|
|
||||||
</p>
|
|
||||||
<ul id="details">
|
|
||||||
<li loop="$checklist => $key,$val">
|
|
||||||
<strong>{$lang->install_checklist_title[$key]}<block cond="$key == 'php_version'">(Ver. {$phpversion})</block></strong>
|
|
||||||
:
|
|
||||||
<em>{$lang->enable}</em>
|
|
||||||
<p cond="$key == 'php_version' && $phpversion_warning === true">
|
|
||||||
{sprintf($lang->install_checklist_desc['php_version_warning'], __XE_RECOMMEND_PHP_VERSION__)} <a href="https://secure.php.net/supported-versions.php" target="_blank">[{$lang->more}]</a>
|
|
||||||
</p>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div cond="$use_rewrite == 'N' && $checklist['permission'] == true">
|
<div cond="$use_rewrite == 'N' && $checklist['permission'] == true">
|
||||||
<p>
|
<p>
|
||||||
<i class="x_icon-ok-sign x_icon-white"></i>
|
<i class="x_icon-ban-circle x_icon-white"></i>
|
||||||
{$lang->disable_rewrite}
|
{$lang->disable_rewrite}
|
||||||
<block cond="$use_nginx == 'Y'"><br> {$lang->about_nginx_rewrite}</block>
|
<block cond="$use_nginx == 'Y'">{$lang->about_nginx_rewrite}</block>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,8 @@ body{background:-webkit-linear-gradient(top,#ccc,#fff);background:-moz-linear-gr
|
||||||
img, fieldset{border:0}
|
img, fieldset{border:0}
|
||||||
form, fieldset{margin:0;padding:0}
|
form, fieldset{margin:0;padding:0}
|
||||||
.x em{color:#ffc;font-weight:normal;font-style:normal}
|
.x em{color:#ffc;font-weight:normal;font-style:normal}
|
||||||
|
.x em.ok{color:#0f0;font-weight:normal;font-style:normal}
|
||||||
|
.x em.error{color:#f44;font-weight:normal;font-style:normal}
|
||||||
.x strong{color:#f60}
|
.x strong{color:#f60}
|
||||||
.x button{margin:0;padding:0;overflow:visible;cursor:pointer}
|
.x button{margin:0;padding:0;overflow:visible;cursor:pointer}
|
||||||
.x a{text-decoration:none}
|
.x a{text-decoration:none}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue