diff --git a/build/exe/doliwamp/install.forced.php.install b/build/exe/doliwamp/install.forced.php.install index b18c224cc4d..89a2625e050 100644 --- a/build/exe/doliwamp/install.forced.php.install +++ b/build/exe/doliwamp/install.forced.php.install @@ -1,4 +1,6 @@ \ No newline at end of file diff --git a/htdocs/install/etape5.php b/htdocs/install/etape5.php index d7c794268d7..5d9ba96a873 100644 --- a/htdocs/install/etape5.php +++ b/htdocs/install/etape5.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2010 Laurent Destailleur + * Copyright (C) 2004-2011 Laurent Destailleur * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2004 Sebastien DiCintio * Copyright (C) 2005-2009 Regis Houssin @@ -30,6 +30,7 @@ include_once("./inc.php"); if (file_exists($conffile)) include_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"); $setuplang=isset($_POST["selectlang"])?$_POST["selectlang"]:(isset($_GET["selectlang"])?$_GET["selectlang"]:'auto'); @@ -215,6 +216,20 @@ if ($action == "set" || preg_match('/upgrade/i',$action)) $conf->global->MAIN_REMOVE_INSTALL_WARNING=1; } + // If we ask to force some modules to be enabled + if (! empty($force_install_module)) + { + $tmparray=explode(',',$force_install_module); + foreach ($tmparray as $modtoactivate) + { + $modtoactivatenew=preg_replace('/\.class\.php$/i','',$modtoactivate); + dolibarr_install_syslog('install/etape5.php Activate module '.$modtoactivatenew); + $result=Activate($modtoactivatenew); + $mesg=''; + if ($result) $mesg=$result; + } + } + dolibarr_install_syslog('install/etape5.php Remove MAIN_NOT_INSTALLED const', LOG_DEBUG); $resql=$db->query("DELETE FROM llx_const WHERE ".$db->decrypt('name')."='MAIN_NOT_INSTALLED'"); if (! $resql) dol_print_error($db,'Error in setup program');