From 9e3b82e8ed23a73fb582ab8c080801c1e9a54235 Mon Sep 17 00:00:00 2001 From: Fabio Chelly Date: Fri, 11 Oct 2013 16:37:26 +0200 Subject: [PATCH] [*] BO Module productcomments: JS variables are correctly escaped. Padding in error message has also been pushed to theme tpl --- .../productcomments/controllers/front/default.php | 2 +- modules/productcomments/productcomments.tpl | 12 ++++++------ .../modules/productcomments/productcomments.tpl | 14 +++++++------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/modules/productcomments/controllers/front/default.php b/modules/productcomments/controllers/front/default.php index ccc3d732a..bca7304f5 100644 --- a/modules/productcomments/controllers/front/default.php +++ b/modules/productcomments/controllers/front/default.php @@ -92,7 +92,7 @@ class ProductCommentsDefaultModuleFrontController extends ModuleFrontController if (!count($errors)) { $customer_comment = ProductComment::getByCustomer(Tools::getValue('id_product'), $id_customer, true, $id_guest); - if (!$customer_comment || ($customer_comment && (strtotime($customer_comment['date_add']) + Configuration::get('PRODUCT_COMMENTS_MINIMAL_TIME')) < time())) + if (!$customer_comment || ($customer_comment && (strtotime($customer_comment['date_add']) + (int)Configuration::get('PRODUCT_COMMENTS_MINIMAL_TIME')) < time())) { $comment = new ProductComment(); diff --git a/modules/productcomments/productcomments.tpl b/modules/productcomments/productcomments.tpl index 0c5c3aecb..710b6665c 100644 --- a/modules/productcomments/productcomments.tpl +++ b/modules/productcomments/productcomments.tpl @@ -24,13 +24,13 @@ *} diff --git a/themes/default/modules/productcomments/productcomments.tpl b/themes/default/modules/productcomments/productcomments.tpl index bbd737670..493a4317d 100644 --- a/themes/default/modules/productcomments/productcomments.tpl +++ b/themes/default/modules/productcomments/productcomments.tpl @@ -24,13 +24,13 @@ *} @@ -109,7 +109,7 @@ var moderation_active = {$moderation_active};

{l s='Write your review' mod='productcomments'}

-