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

SVN:trunk[5054]
This commit is contained in:
Romain Quetiez
2017-10-19 19:06:40 +00:00
parent bbde89e0f9
commit f4881d11c7
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

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