From 1a3f10996242383ed65caec2c25e83692c76ed2c Mon Sep 17 00:00:00 2001 From: jObregon Date: Thu, 10 May 2012 18:44:10 +0000 Subject: [PATCH] [-] BO : #PSCFV-2279 Removed alert if token is invalid. // Trimmed trailing spaces git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15196 b9a71923-0436-4b27-9f14-aed3839534dd --- controllers/admin/AdminPerformanceController.php | 4 ++-- controllers/front/CartController.php | 5 +---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/controllers/admin/AdminPerformanceController.php b/controllers/admin/AdminPerformanceController.php index 7045d34eb..683129567 100644 --- a/controllers/admin/AdminPerformanceController.php +++ b/controllers/admin/AdminPerformanceController.php @@ -504,9 +504,9 @@ class AdminPerformanceControllerCore extends AdminController public function initContent() { $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'; - + if (!extension_loaded('memcache')) $this->warnings[] = $this->l('To use Memcached, you must install the Memcache PECL extension on your server.').' diff --git a/controllers/front/CartController.php b/controllers/front/CartController.php index bb5cd7584..40ee22e99 100644 --- a/controllers/front/CartController.php +++ b/controllers/front/CartController.php @@ -62,11 +62,8 @@ class CartControllerCore extends FrontController 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 - 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')) $this->processChangeProductInCart();