diff --git a/main/install/install_functions.inc.php b/main/install/install_functions.inc.php index 68eaf63f1b..ad24749eb9 100644 --- a/main/install/install_functions.inc.php +++ b/main/install/install_functions.inc.php @@ -105,12 +105,12 @@ function trueFalse($var) } /** - * this function returns a the value of a parameter from the configuration file + * This function returns the value of a parameter from the configuration file * * WARNING - this function relies heavily on global variables $updateFromConfigFile * and $configFile, and also changes these globals. This can be rewritten. * - * @param string $param the parameter which the value is returned for + * @param string $param the parameter of which the value is returned * @return string the value of the parameter * @author Olivier Brouckaert */ @@ -442,8 +442,8 @@ function display_requirements($installType, $badUpdatePath, $update_from_version if($badUpdatePath) { ?>
- Error!
- Dokeos has not been found in that directory. + !
+ Dokeos .
- +
Old version root path::
- - + +
@@ -471,6 +471,7 @@ function display_requirements($installType, $badUpdatePath, $update_from_version //First, attempt to set writing permissions if we don't have them yet //0xxx is an octal number, this is the required format + $notwritable = array(); if(!is_writable('../inc/conf')) { $notwritable[]='../inc/conf'; @@ -515,33 +516,19 @@ function display_requirements($installType, $badUpdatePath, $update_from_version //Second, if this fails, report an error //--> the user will have to adjust the permissions manually - if(!is_writable('../inc/conf') || - !is_writable('../garbage') || - !is_writable('../upload') || - !is_writable('../../archive') || - !is_writable('../../courses') || - !is_writable('../../home') || - (file_exists('../inc/conf/configuration.php') && !is_writable('../inc/conf/configuration.php'))) + if(count($notwritable)>0) { $error=true; - ?> -
- Warning:
- Some files or folders don't have writing permission. To be able to install Dokeos you should first change their permissions (using CHMOD). Please read the installation guide . - 0) - { - echo '
- '; + echo get_lang('Warning').':
'; + printf(get_lang('NoWritePermissionPleaseReadInstallGuide'),'
',' '); + echo ''; + echo ''; } // check wether a Dokeos configuration file already exists. elseif(file_exists('../inc/conf/configuration.php')) @@ -550,15 +537,16 @@ function display_requirements($installType, $badUpdatePath, $update_from_version echo get_lang('WarningExistingDokeosInstallationDetected'); echo ''; } + //and now display the choice buttons (go back or install) ?> -

- - " /> +

+ + " />