mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 02:58:43 +02:00
Fixed the "Reset(APC)Cache" at the end of the installation.
SVN:trunk[2310]
This commit is contained in:
@@ -5076,18 +5076,18 @@ abstract class MetaModel
|
|||||||
return $aEntries;
|
return $aEntries;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function ResetCache($sEnvironment = null)
|
public static function ResetCache($sEnvironmentId = null)
|
||||||
{
|
{
|
||||||
if (!function_exists('apc_delete')) return;
|
if (!function_exists('apc_delete')) return;
|
||||||
if (is_null($sEnvironment))
|
if (is_null($sEnvironmentId))
|
||||||
{
|
{
|
||||||
$sEnvironment = MetaModel::GetEnvironmentId();
|
$sEnvironmentId = MetaModel::GetEnvironmentId();
|
||||||
}
|
}
|
||||||
|
|
||||||
$sAppIdentity = 'itop-'.$sEnvironment;
|
$sAppIdentity = 'itop-'.$sEnvironmentId;
|
||||||
Dict::ResetCache($sAppIdentity);
|
Dict::ResetCache($sAppIdentity);
|
||||||
|
|
||||||
foreach(self::GetCacheEntries($sEnvironment) as $sKey => $aAPCInfo)
|
foreach(self::GetCacheEntries($sEnvironmentId) as $sKey => $aAPCInfo)
|
||||||
{
|
{
|
||||||
$sAPCKey = $aAPCInfo['info'];
|
$sAPCKey = $aAPCInfo['info'];
|
||||||
apc_delete($sAPCKey);
|
apc_delete($sAPCKey);
|
||||||
|
|||||||
@@ -783,6 +783,6 @@ class ApplicationInstaller
|
|||||||
|
|
||||||
// Ready to go !!
|
// Ready to go !!
|
||||||
require_once(APPROOT.'core/dict.class.inc.php');
|
require_once(APPROOT.'core/dict.class.inc.php');
|
||||||
MetaModel::ResetCache($sTargetEnvironment);
|
MetaModel::ResetCache();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user