From 49697053539c491ae4a8636dfd4fd3cbd0f9d8c2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 7 Oct 2007 19:30:03 +0000 Subject: [PATCH] Securite contre install incorrectes --- htdocs/master.inc.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/htdocs/master.inc.php b/htdocs/master.inc.php index 5053d6a2240..2c988727723 100644 --- a/htdocs/master.inc.php +++ b/htdocs/master.inc.php @@ -94,6 +94,18 @@ $pos = strstr ($uri, '/'); // $pos contient alors url sans nom domaine if ($pos == '/') $pos = ''; // si $pos vaut /, on le met a '' define('DOL_URL_ROOT', $pos); // URL racine relative + +/* + * Controle validite fichier conf + */ +if (! file_exists(DOL_DOCUMENT_ROOT ."/lib/functions.inc.php")) +{ + print "Error: Dolibarr config file content seems to be not correctly defined.
\n"; + print "Please run dolibarr setup by calling page /install.
\n"; + exit; +} + + /* * Creation objet $conf */