From 4c3b95209d3732d6ef518178291b700f0cc090ed Mon Sep 17 00:00:00 2001 From: Alan Bell <alanbell@ubuntu.com> Date: Tue, 23 Feb 2016 10:08:04 +0000 Subject: [PATCH] changed to use vtiger cache class --- include/utils/utils.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/include/utils/utils.php b/include/utils/utils.php index 038ab3958..d16865076 100755 --- a/include/utils/utils.php +++ b/include/utils/utils.php @@ -345,15 +345,14 @@ $toHtml = array( */ function to_html($string, $encode=true) { - global $htmlcache; - if($htmlcache[$string]){ - return($htmlcache[$string]); - } $startstring=$string; + $cachedresult=Vtiger_Cache::get('to_html',$startstring); + if($cachedresult){ + return $cachedresult; + } global $log,$default_charset; //$log->debug("Entering to_html(".$string.",".$encode.") method ..."); - global $toHtml; $action = $_REQUEST['action']; $search = $_REQUEST['search']; @@ -391,7 +390,7 @@ function to_html($string, $encode=true) } //$log->debug("Exiting to_html method ..."); - $htmlcache[$startstring]=$string; + Vtiger_Cache::set('to_html', $startstring, $string); return $string; } -- GitLab