Fix: Setup load and check must be in master (used by GUI and Command line scripts) and not in main (used by GUI only)

This commit is contained in:
Laurent Destailleur 2008-03-17 02:53:48 +00:00
parent 0ba4714d13
commit ecf0fc0f77
2 changed files with 7 additions and 22 deletions

View File

@ -88,22 +88,6 @@ foreach ($_POST as $key => $val)
set_include_path($_SERVER['DOCUMENT_ROOT'].'/htdocs');
// Test if install ok
if (! @include_once("conf/conf.php"))
{
Header("Location: install/index.php");
exit;
}
else
{
if (! isset($dolibarr_main_db_host))
{
Header("Location: install/index.php");
exit;
}
}
require_once("master.inc.php");

View File

@ -61,13 +61,14 @@ error_reporting(E_ALL ^ E_NOTICE);
// Include configuration
if (! @include_once("conf/conf.php") || empty($dolibarr_main_db_host))
{
print 'Error: Dolibarr setup was run but was not completed.<br>'."\n";
print 'Please, run <a href="install/index.php">Dolibarr install process</a> until the end...'."\n";
exit;
}
$result=@include_once("conf/conf.php");
if (empty($dolibarr_main_db_host))
{
print 'Error: Dolibarr setup was run but was not completed.<br>'."\n";
print 'Please, run <a href="install/index.php">Dolibarr install process</a> until the end...'."\n";
exit;
}
if (empty($dolibarr_main_db_type)) $dolibarr_main_db_type='mysql'; // Pour compatibilite avec anciennes configs, si non defini, on prend 'mysql'
if (empty($dolibarr_main_data_root))
{