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

SVN:2.4[5055]
This commit is contained in:
Romain Quetiez
2017-10-19 19:10:25 +00:00
parent 11b4085566
commit f932765e19
2 changed files with 9 additions and 1 deletions

View File

@@ -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

View File

@@ -4606,6 +4606,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;