summaryrefslogtreecommitdiff
path: root/install.php
diff options
context:
space:
mode:
authorchris <chris@jalakai.co.uk>2006-09-30 19:01:21 +0200
committerchris <chris@jalakai.co.uk>2006-09-30 19:01:21 +0200
commit70a6aa16e600e1ec2fc65fd0e84ece3b4a046fd7 (patch)
tree7c4ea1bd7cf0eb781256b3c92514b24a7d1e6951 /install.php
parentf4f47358faa5710fe53b642a02ee6a2a01afa3bf (diff)
downloadrpg-70a6aa16e600e1ec2fc65fd0e84ece3b4a046fd7.tar.gz
rpg-70a6aa16e600e1ec2fc65fd0e84ece3b4a046fd7.tar.bz2
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
Diffstat (limited to 'install.php')
-rw-r--r--install.php21
1 files changed, 19 insertions, 2 deletions
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)){