From 2a6b2a454075b31f43e356a8af4f3795070d12ae Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 24 May 2014 14:00:58 +0200 Subject: [PATCH] Fix: Stat page show no cache when there is, if user was using apc. --- htdocs/admin/system/perf.php | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/htdocs/admin/system/perf.php b/htdocs/admin/system/perf.php index ce74d128a7a..124fc7d35bd 100644 --- a/htdocs/admin/system/perf.php +++ b/htdocs/admin/system/perf.php @@ -85,18 +85,35 @@ print '
'; // OPCode cache print '
'; print ''.$langs->trans("OPCodeCache").': '; -$test1=function_exists('xcache_info'); -if ($test1) +$foundcache=0; +$test=function_exists('xcache_info'); +if (! $foundcache && $test) { + $foundcache++; print img_picto('','tick.png').' '.$langs->trans("XCacheInstalled"); print ' '.$langs->trans("MoreInformation").' Xcache admin page'; } -else +$test=function_exists('eaccelerator_info'); +if (! $foundcache && $test) { - $test2=function_exists('eaccelerator_info'); - if ($test2) print img_picto('','tick.png').' '.$langs->trans("EAcceleratorInstalled"); - else print $langs->trans("NoOPCodeCacheFound"); + $foundcache++; + print img_picto('','tick.png').' '.$langs->trans("EAcceleratorInstalled"); } +$test=function_exists('apc_cache_info'); +if (! $foundcache && $test) +{ + //var_dump(apc_cache_info()); + if (ini_get('apc.enabled')) + { + $foundcache++; + print img_picto('','tick.png').' '.$langs->trans("APCInstalled"); + } + else + { + print img_picto('','warning').' '.$langs->trans("APCCacheInstalledButDisabled"); + } +} +if (! $foundcache) print $langs->trans("NoOPCodeCacheFound"); print '
'; // HTTPCacheStaticResources