From 4fefaa5658d2322ea19125f97178b8459249b00d Mon Sep 17 00:00:00 2001 From: Denis Flaven Date: Thu, 7 Apr 2011 08:22:57 +0000 Subject: [PATCH] Make sure that we initialize the list of modules with just the default config and not the previous config. Setup now supports removing modules (even if the actual data are NOT removed from the database, yet). SVN:trunk[1189] --- setup/index.php | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/setup/index.php b/setup/index.php index f88d1cee8..1bf26d1e9 100644 --- a/setup/index.php +++ b/setup/index.php @@ -502,16 +502,12 @@ function AddHiddenParam($oP, $sName, $value) function BuildConfig(SetupWebpage $oP, Config &$oConfig, $aParamValues, $aAvailableModules) { // Initialize the arrays below with default values for the application... - $aAddOns = $oConfig->GetAddOns(); - $aAppModules = $oConfig->GetAppModules(); - // New module in 1.1: synchro, when migrating an *old* configuration file to 1.1 the module may be missing - if (!in_array('synchro/synchrodatasource.class.inc.php', $aAppModules)) - { - $aAppModules[] = 'synchro/synchrodatasource.class.inc.php'; - } - $aDataModels = $oConfig->GetDataModels(); - $aWebServiceCategories = $oConfig->GetWebServiceCategories(); - $aDictionaries = $oConfig->GetDictionaries(); + $oEmptyConfig = new Config('dummy_file', false); // Do NOT load any config file, just set the default values + $aAddOns = $oEmptyConfig->GetAddOns(); + $aAppModules = $oEmptyConfig->GetAppModules(); + $aDataModels = $oEmptyConfig->GetDataModels(); + $aWebServiceCategories = $oEmptyConfig->GetWebServiceCategories(); + $aDictionaries = $oEmptyConfig->GetDictionaries(); // Merge the values with the ones provided by the modules // Make sure when don't load the same file twice... foreach($aParamValues['module'] as $sModuleId)