Protect page if Dolibarr not installed

This commit is contained in:
Laurent Destailleur 2009-09-11 15:23:42 +00:00
parent 0598ee3668
commit cc3e1babd9
2 changed files with 10 additions and 3 deletions

View File

@ -25,11 +25,14 @@
*/
include_once("./inc.php");
if (file_exists($conffile)) include_once($conffile);
if (! file_exists($conffile))
{
print 'Error: Dolibarr config file was not found. This may means that Dolibarr is not installed yet. Please call the page "/install/install.php" instead of "/install/upgrade.php").';
}
require_once($conffile);
require_once($dolibarr_main_document_root."/lib/databases/".$dolibarr_main_db_type.".lib.php");
require_once($dolibarr_main_document_root."/lib/admin.lib.php");
$grant_query='';
$etape = 2;
$ok = 0;

View File

@ -25,7 +25,11 @@
*/
include_once('./inc.php');
if (file_exists($conffile)) include_once($conffile);
if (! file_exists($conffile))
{
print 'Error: Dolibarr config file was not found. This may means that Dolibarr is not installed yet. Please call the page "/install/install.php" instead of "/install/upgrade.php").';
}
require_once($conffile);
require_once($dolibarr_main_document_root . "/lib/databases/".$dolibarr_main_db_type.".lib.php");
require_once($dolibarr_main_document_root . '/facture.class.php');
require_once($dolibarr_main_document_root . '/propal.class.php');