From 99a7ec890d72ec471f45d8e7d921d3cc0ea30525 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 6 Feb 2004 23:53:07 +0000 Subject: [PATCH] =?UTF-8?q?Ajout=20d'un=20test=20pour=20afficher=20erreur?= =?UTF-8?q?=20si=20ni=20authentification=20apache,=20ni=20pear=20n'est=20i?= =?UTF-8?q?nstall=E9.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/main.inc.php | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index fae754c4b38..eb9a7146c9d 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -92,6 +92,24 @@ else } else { + // TODO + // Tester si auth est installé, et si non renvoyé erreur demandant install + // d'une area d'authentification apache ou de auth. + $modules_list = get_loaded_extensions(); + + $ispearinstalled=0; + foreach ($modules_list as $module) { + if ($module == 'pear') { $ispearinstalled=1; } + } + + if (! $ispearinstalled) { + print "Pour fonctionner, Dolibarr a besoin :
\n"; + print "- Soit du module PHP 'pear' (actuellement, votre php contient les modules suivant: ".join($modules_list,',')."
\n"; + print "- Soit d'avoir son répertoire htdocs protégé par une authentification Web basique (Exemple pour Apache: Utilisation des directives Authxxx dans la configuration, ou utilisation du fichier .htaccess).
\n"; + print "

Vous devez respecter un de ces pré-requis pour continuer.\n"; + exit ; + } + require_once "Auth/Auth.php"; $params = array( @@ -267,7 +285,6 @@ if (defined("MAIN_MODULE_SOCIETE") && MAIN_MODULE_SOCIETE) $conf->societe = 1 ; } - if (defined("MAIN_MODULE_COMMERCIAL")) { $conf->commercial->enabled=MAIN_MODULE_COMMERCIAL;