diff --git a/htdocs/install/check.php b/htdocs/install/check.php index 7d0e7e28c54..ae599880dc0 100644 --- a/htdocs/install/check.php +++ b/htdocs/install/check.php @@ -52,19 +52,22 @@ print "
\n"; print $langs->trans("InstallEasy")."

\n"; - print ''.$langs->trans("MiscellanousChecks").":
\n"; + // Check PHP version if (versioncompare(versionphp(),array(4,1)) < 0) { - print 'Error '.$langs->trans("ErrorPHPVersionTooLow",'4.1')."
\n"; + print 'Error '.$langs->trans("ErrorPHPVersionTooLow",'4.1'); $checksok=0; } else { - print 'Ok '.$langs->trans("PHPVersion")." ".versiontostring(versionphp())."
\n"; + print 'Ok '.$langs->trans("PHPVersion")." ".versiontostring(versionphp()); } +print ' ('.$langs->trans("MoreInformation").')'; +print "
\n"; + // Check PHP support for $_POST if (! isset($_GET["testget"]) && ! isset($_POST["testpost"])) @@ -79,7 +82,8 @@ else print 'Ok '.$langs->trans("PHPSupportPOSTGETOk")."
\n"; } -// Si session non actives + +// Check if sessions enabled if (! function_exists("session_id")) { print 'Error '.$langs->trans("ErrorPHPDoesNotSupportSessions")."
\n"; @@ -133,6 +137,8 @@ else $allowupgrade=0; } + + // Si fichier absent et n'a pu etre créé if (! file_exists($conffile)) { @@ -226,6 +232,7 @@ else } + pFooter(1); // 1 car ne doit jamais afficher bouton Suivant ?> diff --git a/htdocs/install/etape1.php b/htdocs/install/etape1.php index 20964b49040..a0d278ad7ab 100644 --- a/htdocs/install/etape1.php +++ b/htdocs/install/etape1.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2005 Laurent Destailleur + * Copyright (C) 2004-2007 Laurent Destailleur * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2004 Sebastien Di Cintio * @@ -28,6 +28,8 @@ \version $Revision$ */ +define('DONOTLOADCONF',1); // To avoid loading conf by file inc..php + include_once("./inc.php"); $setuplang=isset($_POST["selectlang"])?$_POST["selectlang"]:(isset($_GET["selectlang"])?$_GET["selectlang"]:'auto'); @@ -181,7 +183,7 @@ if ($_POST["action"] == "set") if (! is_dir($main_data_dir)) { print "".$langs->trans("ErrorDirDoesNotExists",$main_data_dir); - print "Vous devez créer ce dossier et permettre au serveur web d'écrire dans celui-ci"; + print $langs->trans("YouMustCreateItAndAllowServerToWrite"); print ''; print $langs->trans("Error"); print ""; @@ -301,7 +303,7 @@ if ($_POST["action"] == "set") { if ($db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { - dolibarr_syslog("Utilisateur deja existant"); + dolibarr_syslog("User already exists"); print ''; print $langs->trans("UserCreation").' : '; print $dolibarr_main_db_user; @@ -310,7 +312,7 @@ if ($_POST["action"] == "set") } else { - dolibarr_syslog("impossible de creer l'utilisateur"); + dolibarr_syslog("Failed to create user"); print ''; print $langs->trans("UserCreation").' : '; print $dolibarr_main_db_user; @@ -331,9 +333,10 @@ if ($_POST["action"] == "set") print ''; // Affiche aide diagnostique - print '
Vous avez demandé la création du login Dolibarr "'.$dolibarr_main_db_user.'", mais pour cela, '; + print '
'; + print 'Vous avez demandé la création du login Dolibarr "'.$dolibarr_main_db_user.'", mais pour cela, '; print 'Dolibarr doit se connecter sur le serveur "'.$dolibarr_main_db_host.'" via le super utilisateur "'.$userroot.'".
'; - print 'La connexion ayant échoué, les paramètres du serveur ou du super utilisateur sont peut-etre incorrects. '; + print 'La connexion ayant échoué, les paramètres du serveur ou du super utilisateur sont peut-etre incorrects.
'; print $langs->trans("ErrorGoBackAndCorrectParameters").'

'; print ''; @@ -374,7 +377,7 @@ if ($_POST["action"] == "set") { if ($db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { - dolibarr_syslog("Utilisateur deja existant"); + dolibarr_syslog("User already exists"); print ''; print $langs->trans("UserCreation").' : '; print $dolibarr_main_db_user; @@ -383,7 +386,7 @@ if ($_POST["action"] == "set") } else { - dolibarr_syslog("impossible de creer l'utilisateur"); + dolibarr_syslog("Failed to create user"); print ''; print $langs->trans("UserCreation").' : '; print $dolibarr_main_db_user; @@ -402,9 +405,10 @@ if ($_POST["action"] == "set") print ''; // Affiche aide diagnostique - print '
Vous avez demandé la création du login Dolibarr "'.$dolibarr_main_db_user.'", mais pour cela, '; + print '
'; + print 'Vous avez demandé la création du login Dolibarr "'.$dolibarr_main_db_user.'", mais pour cela, '; print 'Dolibarr doit se connecter sur le serveur "'.$dolibarr_main_db_host.'" via le super utilisateur "'.$userroot.'".
'; - print 'La connexion ayant échoué, les paramètres du serveur ou du super utilisateur sont peut-etre incorrects. '; + print 'La connexion ayant échoué, les paramètres du serveur ou du super utilisateur sont peut-etre incorrects.
'; print $langs->trans("ErrorGoBackAndCorrectParameters").'

'; print ''; @@ -444,8 +448,10 @@ if ($_POST["action"] == "set") print ''.$langs->trans("Error").' '.$db->errno().''; // Affiche aide diagnostique - print '
La création de la base Dolibarr "'.$dolibarr_main_db_name.'" a échoué.'; - print 'Si la base existe déjà, revenez en arrière et désactiver l\'option "Créer la base de donnée".
'; + print '
'; + print $langs->trans("ErrorFailedToCreateDatabase",$dolibarr_main_db_name).'
'; + print $langs->trans("IfDatabaseExistsGoBackAndCheckCreate"); + print '
'; print ''; $error++; @@ -463,7 +469,7 @@ if ($_POST["action"] == "set") // Affiche aide diagnostique print '
Vous avez demandé la création de la base Dolibarr "'.$dolibarr_main_db_name.'", mais pour cela, '; print 'Dolibarr doit se connecter sur le serveur "'.$dolibarr_main_db_host.'" via le super utilisateur "'.$userroot.'".
'; - print 'La connexion ayant échoué, les paramètres du serveur ou du super utilisateur sont peut-etre incorrects. '; + print 'La connexion ayant échoué, les paramètres du serveur ou du super utilisateur sont peut-etre incorrects.
'; print $langs->trans("ErrorGoBackAndCorrectParameters").'

'; print ''; @@ -525,7 +531,7 @@ if ($_POST["action"] == "set") // Affiche aide diagnostique print '
Vérifier que le nom de base "'.$dolibarr_main_db_name.'" est correct.
'; - print 'Si ce nom est correct et que cette base n\'existe pas déjà, vous devez cocher l\'option "Créer la base de donnée". '; + print 'Si ce nom est correct et que cette base n\'existe pas déjà, vous devez cocher l\'option "Créer la base de donnée".
'; print $langs->trans("ErrorGoBackAndCorrectParameters").'

'; print ''; @@ -552,7 +558,8 @@ if ($_POST["action"] == "set") } } } - print ''; + + print ''; } pFooter($error,$setuplang); diff --git a/htdocs/install/inc.php b/htdocs/install/inc.php index 8f20bd1056e..8fdcb57dae3 100644 --- a/htdocs/install/inc.php +++ b/htdocs/install/inc.php @@ -2,6 +2,7 @@ /* Copyright (C) 2004 Rodolphe Quiedeville * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2004 Sebastien DiCintio + * Copyright (C) 2007 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -44,9 +45,12 @@ if (file_exists($conffile)) if ($dolibarr_main_document_root) { require_once($dolibarr_main_document_root . "/conf/conf.class.php"); - require_once($dolibarr_main_document_root . "/lib/databases/".$dolibarr_main_db_type.".lib.php"); $conf=new Conf(); } + if ($dolibarr_main_document_root && $dolibarr_main_db_type && ! defined('DONOTLOADCONF')) + { + require_once($dolibarr_main_document_root . "/lib/databases/".$dolibarr_main_db_type.".lib.php"); + } } if (! isset($dolibarr_main_db_prefix) || ! $dolibarr_main_db_prefix) $dolibarr_main_db_prefix='llx_'; define('MAIN_DB_PREFIX',$dolibarr_main_db_prefix); @@ -106,7 +110,7 @@ function pHeader($soutitre,$next,$action='set') print ''.$langs->trans("DolibarrSetup").''; print ''; print ''; - print ''.$langs->trans("DolibarrSetup").''; + print ''.$langs->trans("DolibarrSetup").''; print '
'; print ''; diff --git a/htdocs/langs/en_US/install.lang b/htdocs/langs/en_US/install.lang index 0e93eace524..2b6c2d9c4eb 100644 --- a/htdocs/langs/en_US/install.lang +++ b/htdocs/langs/en_US/install.lang @@ -16,9 +16,10 @@ ErrorPHPDoesNotSupportSessions=Your PHP installation does not support sessions. ErrorDirDoesNotExists=Directory %s does not exists. ErrorGoBackAndCorrectParameters=Go backward and correct wrong parameters. ErrorWrongValueForParameter=You may have typed a wrong value for parameter '%s'. -ErrorFailedToCreateDatabase=Failed to create database '%'. -ErrorFailedToConnectToDatabase=Failed to connect to database '%'. +ErrorFailedToCreateDatabase=Failed to create database '%s'. +ErrorFailedToConnectToDatabase=Failed to connect to database '%s'. ErrorPHPVersionTooLow=PHP version too old. Version %s is required. +IfDatabaseExistsGoBackAndCheckCreate=If database already exists, go back and uncheck "Create database" option. PHPVersion=PHP Version YouCanContinue=You can continue... License=Using license @@ -95,6 +96,7 @@ CorrectProblemAndReloadPage=Correct problem and reload page (Pr AlreadyDone=Already migrated DatabaseVersion=Database version ServerVersion=Database server version +YouMustCreateItAndAllowServerToWrite=You must create this directory and grant web server to write into. ######### # upgrade diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index fd1cffa6e2c..665d34beaf4 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -41,6 +41,7 @@ ReturnCodeLastAccess=Return code for last database access InformationLastAccess=Information for last database access DolibarrHasDetectedError=Dolibarr has detected a technical error InformationToHelpDiagnose=This is information that can help to diagnose +MoreInformation=More information NotePublic=Note (public) NotePrivate=Note (private) yes=yes diff --git a/htdocs/langs/fr_FR/install.lang b/htdocs/langs/fr_FR/install.lang index 7c286187af9..91f8cbefdd1 100644 --- a/htdocs/langs/fr_FR/install.lang +++ b/htdocs/langs/fr_FR/install.lang @@ -16,9 +16,10 @@ ErrorPHPDoesNotSupportSessions=Votre installation PHP ne supporte pas les sessio ErrorDirDoesNotExists=Le répertoire %s n'existe pas ou n'est pas accessible. ErrorGoBackAndCorrectParameters=Revenez en arrière et corrigez les paramètres invalides. ErrorWrongValueForParameter=Vous avez peut-être saisi une mauvaise valeur pour le paramètre '%s'. -ErrorFailedToCreateDatabase=Echec de création de la base '%'. -ErrorFailedToConnectToDatabase=Echec de connection à la base '%'. +ErrorFailedToCreateDatabase=Echec de création de la base '%s'. +ErrorFailedToConnectToDatabase=Echec de connection à la base '%s'. ErrorPHPVersionTooLow=Version de PHP trop ancienne. La version %s est requise. +IfDatabaseExistsGoBackAndCheckCreate=Si la base existe déjà, revenez en arrière et désactiver l'option "Créer la base de donnée". PHPVersion=Version PHP YouCanContinue=Vous pouvez continuer... License=Licence d'utilisation @@ -96,6 +97,7 @@ CorrectProblemAndReloadPage=Corrigez le probl AlreadyDone=Déjà migré DatabaseVersion=Version de la base ServerVersion=Version du serveur de base de donnée +YouMustCreateItAndAllowServerToWrite=Vous devez créer ce dossier et permettre au serveur web d'écrire dans celui-ci. ######### # upgrade diff --git a/htdocs/langs/fr_FR/main.lang b/htdocs/langs/fr_FR/main.lang index e3ff14a3347..b1312f01bb2 100644 --- a/htdocs/langs/fr_FR/main.lang +++ b/htdocs/langs/fr_FR/main.lang @@ -41,6 +41,7 @@ ReturnCodeLastAccess=Code retour dernier acces en base InformationLastAccess=Information sur le dernier accès en base DolibarrHasDetectedError=Dolibarr a détecté une erreur technique InformationToHelpDiagnose=Voici les informations qui pourront aider au diagnostic +MoreInformation=Plus d'information NotePublic=Note (publique) NotePrivate=Note (privée) yes=oui