From 01868b944c89484280b7f65db1bbe650c6624a8b Mon Sep 17 00:00:00 2001 From: rMalie Date: Fri, 5 Aug 2011 14:21:16 +0000 Subject: [PATCH] // Fix on module product comment for context git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7914 b9a71923-0436-4b27-9f14-aed3839534dd --- modules/productcomments/productcomments.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/productcomments/productcomments.php b/modules/productcomments/productcomments.php index 37bc1e82e..69273d76b 100644 --- a/modules/productcomments/productcomments.php +++ b/modules/productcomments/productcomments.php @@ -508,6 +508,7 @@ class ProductComments extends Module if (!$customerComment OR ($customerComment AND (strtotime($customerComment['date_add']) + Configuration::get('PRODUCT_COMMENTS_MINIMAL_TIME')) < time())) { + $errors = array(); $customer_name = false; if ($id_guest AND (!$customer_name = Tools::getValue('customer_name'))) $errors[] = $this->l('Please fill your name'); @@ -575,8 +576,7 @@ class ProductComments extends Module 'too_early' => ($customerComment AND (strtotime($customerComment['date_add']) + Configuration::get('PRODUCT_COMMENTS_MINIMAL_TIME')) > time()), 'delay' => Configuration::get('PRODUCT_COMMENTS_MINIMAL_TIME'))); - $controller = new FrontController(); - $controller->pagination((int)ProductComment::getCommentNumber((int)Tools::getValue('id_product'))); + $this->context->controller->pagination((int)ProductComment::getCommentNumber((int)Tools::getValue('id_product'))); return ($this->display(__FILE__, '/productcomments.tpl')); }