浏览代码

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).

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@1189 a333f486-631f-4898-b8df-5754b55c2be0
dflaven 14 年之前
父节点
当前提交
8567550397
共有 1 个文件被更改,包括 6 次插入10 次删除
  1. 6 10
      setup/index.php

+ 6 - 10
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)