Browse Source

Compiler: Model alterations not flattened prior to compilation (when using the setup UI) -no need for doing the job twice (compiling from within the toolkit)

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@3858 a333f486-631f-4898-b8df-5754b55c2be0
romainq 9 years ago
parent
commit
d4186a6dd9
1 changed files with 8 additions and 5 deletions
  1. 8 5
      setup/runtimeenv.class.inc.php

+ 8 - 5
setup/runtimeenv.class.inc.php

@@ -1,5 +1,5 @@
 <?php
-// Copyright (C) 2010-2015 Combodo SARL
+// Copyright (C) 2010-2016 Combodo SARL
 //
 //   This file is part of iTop.
 //
@@ -20,7 +20,7 @@
 /**
  * Manage a runtime environment
  *
- * @copyright   Copyright (C) 2010-2015 Combodo SARL
+ * @copyright   Copyright (C) 2010-2016 Combodo SARL
  * @license     http://opensource.org/licenses/AGPL-3.0
  */
 
@@ -420,9 +420,6 @@ class RunTimeEnvironment
 		}
 		else
 		{
-			$oFactory->ApplyChanges();
-			//$oFactory->Dump();
-
 			$sTargetDir = APPROOT.'env-'.$this->sTargetEnv;
 			self::MakeDirSafe($sTargetDir);
 			$oMFCompiler = new MFCompiler($oFactory);
@@ -486,6 +483,12 @@ class RunTimeEnvironment
 				MetaModel::CheckDataSources(false /*$bDiagnostics*/, true/*$bVerbose*/);
 				$sFeedback = ob_get_clean();
 				$this->log_ok("Data sources checked: $sFeedback");
+
+				// Fix meta enums
+				ob_start();
+				MetaModel::RebuildMetaEnums(true /*bVerbose*/);
+				$sFeedback = ob_get_clean();
+				$this->log_ok("Meta enums rebuilt: $sFeedback");
 			}
 			else
 			{