SMF Development > Fixed or Bogus Bugs
[4350] Only shows one caching engine even if multiple are available
live627:
OK. Here is my proposed ix (clunky as it may be):
./Sources/ManageServer.php
--- Code: (Find) --- if (function_exists('eaccelerator_put'))
$detected = 'eAccelerator';
elseif (function_exists('mmcache_put'))
$detected = 'MMCache';
elseif (function_exists('apc_store'))
$detected = 'APC';
elseif (function_exists('output_cache_put'))
$detected = 'Zend';
elseif (function_exists('memcache_set'))
$detected = 'Memcached';
elseif (function_exists('xcache_set'))
$detected = 'XCache';
else
$detected = 'no_caching';
$context['settings_message'] = sprintf($context['settings_message'], $txt['detected_' . $detected]);
--- End code ---
--- Code: (Replace with) --- $detected = array();
// Detect an optimizer?
if (function_exists('eaccelerator_put'))
$detected[] = 'eAccelerator';
if (function_exists('mmcache_put'))
$detected[] = 'MMCache';
if (function_exists('apc_store'))
$detected[] = 'APC';
if (function_exists('output_cache_put'))
$detected[] = 'Zend';
if (function_exists('memcache_set'))
$detected[] = 'Memcached';
if (function_exists('xcache_set'))
$detected[] = 'XCache';
$installed = implode(', ', $detected);
if (empty($detected))
$context['settings_message'] = sprintf($context['settings_message'], $txt['detected_no_caching']);
$context['settings_message'] = sprintf($context['settings_message'], sprintf($txt['detected_accelerators'], $installed));
--- End code ---
./Themes/default/languages/ManageSettings.php
--- Code: (Find) ---$txt['detected_APC'] = '<strong style="color: green">SMF has detected that your server has APC installed.</strong>';
$txt['detected_eAccelerator'] = '<strong style="color: green">SMF has detected that your server has eAccelerator installed.</strong>';
$txt['detected_MMCache'] = '<strong style="color: green">SMF has detected that your server has MMCache installed.</strong>';
$txt['detected_Zend'] = '<strong style="color: green">SMF has detected that your server has Zend installed.</strong>';
$txt['detected_Memcached'] = '<strong style="color: green">SMF has detected that your server has Memcached installed.</strong>';
$txt['detected_XCache'] = '<strong style="color: green">SMF has detected that your server has XCache installed.</strong>';
--- End code ---
--- Code: (Replace with) ---$txt['detected_accelerators'] = '<strong style="color: green">SMF has detected the following accelerators: %1$s</strong>';
--- End code ---
Again, it seems clunky and slow, but it's a quick fix that works.
Kill Em All:
I marked this in mantis. Thanks for providing a fix too live627.
http://dev.simplemachines.org/mantis/view.php?id=4350
live627:
Glad to help! Doing that was quite fun, too.
ѕησω:
Updating the topic as Confirmed.
Nice work live627 :)
live627:
Is it hidden for a reason? Access denied to regular members...
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version