// wrong commit for ed09cee7b1

This commit is contained in:
gRoussac
2013-03-12 14:48:28 +01:00
parent 7d095f92c4
commit 0749a6f29d
@@ -548,6 +548,7 @@ 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')
@@ -742,16 +743,16 @@ class AdminPerformanceControllerCore extends AdminController
if ($cache_active && $caching_system == 'CacheMemcache' && !extension_loaded('memcache')) if ($cache_active && $caching_system == 'CacheMemcache' && !extension_loaded('memcache'))
$this->errors[] = Tools::displayError('To use Memcached, you must install the Memcache PECL extension on your server.').' $this->errors[] = Tools::displayError('To use Memcached, you must install the Memcache PECL extension on your server.').'
<a href="http://www.php.net/manual/en/memcache.installation.php">http://www.php.net/manual/en/memcache.installation.php</a>'; <a href="http://www.php.net/manual/en/memcache.installation.php">http://www.php.net/manual/en/memcache.installation.php</a>';
else if ($cache_active && $caching_system == 'CacheApc' && !extension_loaded('apc')) elseif ($cache_active && $caching_system == 'CacheApc' && !extension_loaded('apc'))
$this->errors[] = Tools::displayError('To use APC cache, you must install the APC PECL extension on your server.').' $this->errors[] = Tools::displayError('To use APC cache, you must install the APC PECL extension on your server.').'
<a href="http://fr.php.net/manual/fr/apc.installation.php">http://fr.php.net/manual/fr/apc.installation.php</a>'; <a href="http://fr.php.net/manual/fr/apc.installation.php">http://fr.php.net/manual/fr/apc.installation.php</a>';
else if ($cache_active && $caching_system == 'CacheXcache' && !extension_loaded('xcache')) elseif ($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')) 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).').' $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>'; <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_)) elseif ($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.'),
realpath(_PS_CACHEFS_DIRECTORY_) realpath(_PS_CACHEFS_DIRECTORY_)
@@ -768,7 +769,7 @@ class AdminPerformanceControllerCore extends AdminController
Configuration::updateValue('PS_CACHEFS_DIRECTORY_DEPTH', (int)$depth); Configuration::updateValue('PS_CACHEFS_DIRECTORY_DEPTH', (int)$depth);
} }
} }
else if ($caching_system == 'CacheMemcache' && $cache_active && !_PS_CACHE_ENABLED_ && _PS_CACHING_SYSTEM_ == 'CacheMemcache') elseif ($caching_system == 'CacheMemcache' && $cache_active && !_PS_CACHE_ENABLED_ && _PS_CACHING_SYSTEM_ == 'CacheMemcache')
Cache::getInstance()->flush(); Cache::getInstance()->flush();
if (!count($this->errors)) if (!count($this->errors))
@@ -788,7 +789,10 @@ 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();
} }
@@ -821,5 +825,4 @@ class AdminPerformanceControllerCore extends AdminController
die; die;
} }
} }