[-] BO : #PSCFV-2279 Removed alert if token is invalid.
// Trimmed trailing spaces
This commit is contained in:
@@ -504,9 +504,9 @@ class AdminPerformanceControllerCore extends AdminController
|
|||||||
public function initContent()
|
public function initContent()
|
||||||
{
|
{
|
||||||
$php_dot_net_supported_langs = array('en', 'zh', 'fr', 'de', 'ja', 'pl', 'ro', 'ru', 'fa', 'es', 'tr');
|
$php_dot_net_supported_langs = array('en', 'zh', 'fr', 'de', 'ja', 'pl', 'ro', 'ru', 'fa', 'es', 'tr');
|
||||||
$php_lang = in_array($this->context->language->iso_code, $php_dot_net_supported_langs) ?
|
$php_lang = in_array($this->context->language->iso_code, $php_dot_net_supported_langs) ?
|
||||||
$this->context->language->iso_code : 'en';
|
$this->context->language->iso_code : 'en';
|
||||||
|
|
||||||
if (!extension_loaded('memcache'))
|
if (!extension_loaded('memcache'))
|
||||||
$this->warnings[] = $this->l('To use Memcached, you must install the Memcache PECL extension on your server.').'
|
$this->warnings[] = $this->l('To use Memcached, you must install the Memcache PECL extension on your server.').'
|
||||||
<a href="http://www.php.net/manual/'.substr($php_lang, 0, 2).'/memcache.installation.php" target="_blank">
|
<a href="http://www.php.net/manual/'.substr($php_lang, 0, 2).'/memcache.installation.php" target="_blank">
|
||||||
|
|||||||
@@ -62,11 +62,8 @@ class CartControllerCore extends FrontController
|
|||||||
|
|
||||||
public function postProcess()
|
public function postProcess()
|
||||||
{
|
{
|
||||||
if ($this->context->customer->isLogged() && !$this->isTokenValid())
|
|
||||||
$this->errors[] = Tools::displayError('Invalid token');
|
|
||||||
|
|
||||||
// Update the cart ONLY if $this->cookies are available, in order to avoid ghost carts created by bots
|
// Update the cart ONLY if $this->cookies are available, in order to avoid ghost carts created by bots
|
||||||
if ($this->context->cookie->exists() && !$this->errors)
|
if ($this->context->cookie->exists() && !$this->errors && !($this->context->customer->isLogged() && !$this->isTokenValid()))
|
||||||
{
|
{
|
||||||
if (Tools::getIsset('add') || Tools::getIsset('update'))
|
if (Tools::getIsset('add') || Tools::getIsset('update'))
|
||||||
$this->processChangeProductInCart();
|
$this->processChangeProductInCart();
|
||||||
|
|||||||
Reference in New Issue
Block a user