From 7ce06c07971857b39db5d74c72f55fe6c9274b1c Mon Sep 17 00:00:00 2001 From: Romain Quetiez Date: Thu, 1 Dec 2016 10:08:35 +0000 Subject: [PATCH] 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] --- application/forms.class.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/forms.class.inc.php b/application/forms.class.inc.php index 205ed056b..00c602145 100644 --- a/application/forms.class.inc.php +++ b/application/forms.class.inc.php @@ -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))