From 70a6aa16e600e1ec2fc65fd0e84ece3b4a046fd7 Mon Sep 17 00:00:00 2001 From: chris <chris@jalakai.co.uk> Date: Sat, 30 Sep 2006 19:01:21 +0200 Subject: [PATCH] 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 --- inc/lang/en/lang.php | 1 + install.php | 21 +++++++++++++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/inc/lang/en/lang.php b/inc/lang/en/lang.php index 567eaee0c..924c4c8d3 100644 --- a/inc/lang/en/lang.php +++ b/inc/lang/en/lang.php @@ -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 : diff --git a/install.php b/install.php index ac6d37f9f..243b319b4 100644 --- a/install.php +++ b/install.php @@ -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)){ -- GitLab