install: fix bug #436 and small typo
Function check_htaccess() don't perform check if curl is not installed. This was leading to wsod beacuse check_htaccess() uses fetch_url().
This commit is contained in:
parent
bad66a1154
commit
1d1c50f6e3
21
mod/install.php
Normal file → Executable file
21
mod/install.php
Normal file → Executable file
|
@ -184,7 +184,7 @@ function install_content(&$a) {
|
||||||
|
|
||||||
check_php($phpath, $checks);
|
check_php($phpath, $checks);
|
||||||
|
|
||||||
check_htaccess($checks);
|
check_htaccess($checks);
|
||||||
|
|
||||||
function check_passed($v, $c){
|
function check_passed($v, $c){
|
||||||
if ($c['required'])
|
if ($c['required'])
|
||||||
|
@ -194,6 +194,7 @@ function install_content(&$a) {
|
||||||
$checkspassed = array_reduce($checks, "check_passed", true);
|
$checkspassed = array_reduce($checks, "check_passed", true);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$tpl = get_markup_template('install_checks.tpl');
|
$tpl = get_markup_template('install_checks.tpl');
|
||||||
$o .= replace_macros($tpl, array(
|
$o .= replace_macros($tpl, array(
|
||||||
'$title' => $install_title,
|
'$title' => $install_title,
|
||||||
|
@ -381,6 +382,7 @@ function check_funcs(&$checks) {
|
||||||
check_add($ck_funcs, t('Apache mod_rewrite module'), true, true, "");
|
check_add($ck_funcs, t('Apache mod_rewrite module'), true, true, "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(! function_exists('curl_init')){
|
if(! function_exists('curl_init')){
|
||||||
$ck_funcs[0]['status']= false;
|
$ck_funcs[0]['status']= false;
|
||||||
$ck_funcs[0]['help']= t('Error: libCURL PHP module required but not installed.');
|
$ck_funcs[0]['help']= t('Error: libCURL PHP module required but not installed.');
|
||||||
|
@ -430,12 +432,17 @@ function check_htaccess(&$checks) {
|
||||||
$a = get_app();
|
$a = get_app();
|
||||||
$status = true;
|
$status = true;
|
||||||
$help = "";
|
$help = "";
|
||||||
$test = fetch_url($a->get_baseurl()."/install/testrewrite");
|
if (function_exists('curl_init')){
|
||||||
if ($test!="ok") {
|
$test = fetch_url($a->get_baseurl()."/install/testrewrite");
|
||||||
$status = false;
|
if ($test!="ok") {
|
||||||
$help = t('Url rewrite in .htconfig is not working. Check your server configuration.');
|
$status = false;
|
||||||
}
|
$help = t('Url rewrite in .htaccess is not working. Check your server configuration.');
|
||||||
check_add($checks, t('Url rewrite is working'), $status, true, $help);
|
}
|
||||||
|
check_add($checks, t('Url rewrite is working'), $status, true, $help);
|
||||||
|
} else {
|
||||||
|
// cannot check modrewrite if libcurl is not installed
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue