Kaynağa Gözat

N.1100 Regression introduced in [r4943], aka 2.4 RC3, and causing error during MTP (accessing the wrong expression cache)

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@5054 a333f486-631f-4898-b8df-5754b55c2be0
romainq 7 yıl önce
ebeveyn
işleme
b97da6e279
2 değiştirilmiş dosya ile 9 ekleme ve 1 silme
  1. 1 1
      application/utils.inc.php
  2. 8 0
      core/metamodel.class.php

+ 1 - 1
application/utils.inc.php

@@ -927,7 +927,7 @@ class utils
 	 */
 	public static function GetCachePath()
 	{
-		return APPROOT.'data/cache-'.self::GetCurrentEnvironment().'/';
+		return APPROOT.'data/cache-'.MetaModel::GetEnvironment().'/';
 	}
 	/**
 	 * Merge standard menu items with plugin provided menus items

+ 8 - 0
core/metamodel.class.php

@@ -4863,6 +4863,14 @@ abstract class MetaModel
 		return self::$m_oConfig;
 	}
 
+	/**
+	 * @return string The environment in which the model has been loaded (e.g. 'production')
+	 */
+	public static function GetEnvironment()
+	{
+		return self::$m_sEnvironment;
+	}
+
 	public static function GetEnvironmentId()
 	{
 		return md5(APPROOT).'-'.self::$m_sEnvironment;