// 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
This commit is contained in:
rMalie
2011-08-05 14:21:16 +00:00
parent 03ffa388af
commit 01868b944c
+2 -2
View File
@@ -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'));
}