Browse Source

Upgrade: adjust data sources, and be more verbose about upgrades in the DB (HKeys and data sources)

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@1531 a333f486-631f-4898-b8df-5754b55c2be0
romainq 13 years ago
parent
commit
29cbbc2cd5
1 changed files with 12 additions and 2 deletions
  1. 12 2
      setup/setuppage.class.inc.php

+ 12 - 2
setup/setuppage.class.inc.php

@@ -675,9 +675,19 @@ function CreateDatabaseStructure(Config $oConfig, $aSelectedModules, $sMode)
 		if (MetaModel::DBExists(/* bMustBeComplete */ false))
 		{
 			MetaModel::DBCreate();
-			SetupWebPage::log_ok("Database structure successfully created.");
+			SetupWebPage::log_ok("Database structure successfully updated.");
+
 			// Check (and update only if it seems needed) the hierarchical keys
-			MetaModel::CheckHKeys(false /* bDiagnosticsOnly */, false /* bVerbose*/, true /* bForceUpdate */); // Since in 1.2-beta the detection was buggy, let's force the rebuilding of HKeys
+			ob_start();
+			MetaModel::CheckHKeys(false /* bDiagnosticsOnly */, true /* bVerbose*/, true /* bForceUpdate */); // Since in 1.2-beta the detection was buggy, let's force the rebuilding of HKeys
+			$sFeedback = ob_get_clean();
+			SetupWebPage::log_ok("Hierchical keys rebuilt: $sFeedback");
+
+			// Check (and fix) data sync configuration
+			ob_start();
+			MetaModel::CheckDataSources(false /*$bDiagnostics*/, true/*$bVerbose*/);
+			$sFeedback = ob_get_clean();
+			SetupWebPage::log_ok("Data sources checked: $sFeedback");
 		}
 		else
 		{