Optimizations. Continuation of [r4423] and [r4471]. The optimization of the load of icons does not work depending on the itop installation directory and version of PHP (crc32 producing a negative value, not suitable for a class name).

SVN:trunk[4485]
This commit is contained in:
Romain Quetiez
2016-12-01 10:08:35 +00:00
parent 53bf1f424a
commit 7ce06c0797

View File

@@ -1370,7 +1370,7 @@ class RunTimeIconSelectionField extends DesignerIconSelectionField
{
$aFiles = null;
$sKey = $sBaseDir.'/'.$sDir;
$sShortKey = crc32($sKey);
$sShortKey = abs(crc32($sKey));
$sCacheFile = utils::GetCachePath().'available-icons-'.$sShortKey.'.php';
$sCacheClass = 'AvailableIcons_'.$sShortKey;
if (file_exists($sCacheFile))