install.php updates

- add retry button (as suggested by Diego Georgini)
- correct error color, from green to red (spotted by Diego Georgini)
- add utf8_decode and utf8_encode to required function list, when
  mb_string functions are not available.
- remove extra backslash from reported file names.

darcs-hash:20060930170121-9b6ab-d7b4a455b01d28f35b8c69385639439eaca8944e.gz
This commit is contained in:
chris 2006-09-30 19:01:21 +02:00
parent f4f47358fa
commit 70a6aa16e6
2 changed files with 20 additions and 2 deletions

View File

@ -220,5 +220,6 @@ $lang['i_pol0'] = 'Open Wiki (read, write, upload for everyone)';
$lang['i_pol1'] = 'Public Wiki (read for everyone, write and upload for registered users)';
$lang['i_pol2'] = 'Closed Wiki (read, write, upload for registered users only)';
$lang['i_retry'] = 'Retry';
//Setup VIM: ex: et ts=2 enc=utf-8 :

View File

@ -59,7 +59,7 @@ header('Content-Type: text/html; charset=utf-8');
body { width: 90%; margin: 0 auto; font: 84% Verdana, Helvetica, Arial, sans-serif; }
img { border: none }
br.cl { clear:both; }
code { font-size: 110%; color: #008000; }
code { font-size: 110%; color: #800000; }
fieldset { border: none }
label { display: block; margin-top: 0.5em; }
select.text, input.text { width: 30em; margin: 0 0.5em; }
@ -110,6 +110,7 @@ header('Content-Type: text/html; charset=utf-8');
if(! (check_functions() && check_permissions()) ){
echo '<p>'.$lang['i_problems'].'</p>';
print_errors();
print_retry();
}elseif(!check_configs()){
echo '<p>'.$lang['i_modified'].'</p>';
print_errors();
@ -195,6 +196,17 @@ function print_form($d){
<?php
}
function print_retry() {
global $lang;
?>
<form action="" method="get">
<fieldset>
<input class="button" type="submit" value="<?php echo $lang['i_retry'];?>" />
</fieldset>
</form>
<?php
}
/**
* Check validity of data
*
@ -384,7 +396,7 @@ function check_permissions(){
$ok = true;
foreach($dirs as $dir){
if(!@file_exists("$dir/.") || !@is_writable($dir)){
$dir = str_replace($_SERVER['DOCUMENT_ROOT'],'{DOCUMENT_ROOT}/', $dir);
$dir = str_replace($_SERVER['DOCUMENT_ROOT'],'{DOCUMENT_ROOT}', $dir);
$error[] = sprintf($lang['i_permfail'],$dir);
$ok = false;
}
@ -406,6 +418,11 @@ function check_functions(){
'ob_start opendir parse_ini_file readfile realpath '.
'rename rmdir serialize session_start unlink usleep');
if (!function_exists('mb_substr')) {
$funcs[] = 'utf8_encode';
$funcs[] = 'utf8_decode';
}
$ok = true;
foreach($funcs as $func){
if(!function_exists($func)){