[*] BO : Set warning when trying to activate Xcache misconfigured

This commit is contained in:
gRoussac committed 2013-03-12 14:41:07 +01:00
1 parent abb225143b
commit ed09cee7b1
1 file changed
+3 -4
@@ -548,7 +548,6 @@ class AdminPerformanceControllerCore extends AdminController
return; return;
} }
Hook::exec('action'.get_class($this).ucfirst($this->action).'Before', array('controller' => $this));
if (Tools::isSubmit('submitAddServer')) if (Tools::isSubmit('submitAddServer'))
{ {
if ($this->tabAccess['add'] === '1') if ($this->tabAccess['add'] === '1')
@@ -749,6 +748,9 @@ class AdminPerformanceControllerCore extends AdminController
else if ($cache_active && $caching_system == 'CacheXcache' && !extension_loaded('xcache')) else if ($cache_active && $caching_system == 'CacheXcache' && !extension_loaded('xcache'))
$this->errors[] = Tools::displayError('To use Xcache, you must install the Xcache extension on your server.').' $this->errors[] = Tools::displayError('To use Xcache, you must install the Xcache extension on your server.').'
<a href="http://xcache.lighttpd.net">http://xcache.lighttpd.net</a>'; <a href="http://xcache.lighttpd.net">http://xcache.lighttpd.net</a>';
else if ($cache_active && $caching_system == 'CacheXcache' && !ini_get('xcache.var_size'))
$this->errors[] = Tools::displayError('To use Xcache, you must configure "xcache.var_size" for the Xcache extension (recommended value 16M to 64M).').'
<a href="http://xcache.lighttpd.net/wiki/XcacheIni">http://xcache.lighttpd.net/wiki/XcacheIni</a>';
else if ($cache_active && $caching_system == 'CacheFs' && !is_writable(_PS_CACHEFS_DIRECTORY_)) else if ($cache_active && $caching_system == 'CacheFs' && !is_writable(_PS_CACHEFS_DIRECTORY_))
$this->errors[] = sprintf( $this->errors[] = sprintf(
Tools::displayError('To use CacheFS the directory %s must be writable.'), Tools::displayError('To use CacheFS the directory %s must be writable.'),
@@ -786,10 +788,7 @@ class AdminPerformanceControllerCore extends AdminController
$this->errors[] = Tools::displayError('You do not have permission to edit here.'); $this->errors[] = Tools::displayError('You do not have permission to edit here.');
} }
if ($redirectAdmin && (!isset($this->errors) || !count($this->errors))) if ($redirectAdmin && (!isset($this->errors) || !count($this->errors)))
{
Hook::exec('action'.get_class($this).ucfirst($this->action).'After', array('controller' => $this, 'return' => ''));
Tools::redirectAdmin(self::$currentIndex.'&token='.Tools::getValue('token').'&conf=4'); Tools::redirectAdmin(self::$currentIndex.'&token='.Tools::getValue('token').'&conf=4');
}
else else
return parent::postProcess(); return parent::postProcess();
} }