[+] CORE : Fixed cache_id

This commit is contained in:
gRoussac
2013-11-12 17:09:38 +01:00
parent fc193d5c8b
commit 036e2362c9
16 changed files with 34 additions and 34 deletions
+3 -3
View File
@@ -97,7 +97,7 @@ class ProductComment extends ObjectModel
if ($n != null && $n <= 0)
$n = 5;
$cache_id = __CLASS__.__FUNCTION__.(int)$id_product.'-'.(int)$p.'-'.(int)$n.'-'.(int)$id_customer.'-'.(bool)$validate;
$cache_id = 'ProductComment::getByProduct_'.(int)$id_product.'-'.(int)$p.'-'.(int)$n.'-'.(int)$id_customer.'-'.(bool)$validate;
if (!Cache::isStored($cache_id))
{
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
@@ -124,7 +124,7 @@ class ProductComment extends ObjectModel
*/
public static function getByCustomer($id_product, $id_customer, $get_last = false, $id_guest = false)
{
$cache_id = __CLASS__.__FUNCTION__.(int)$id_product.'-'.(int)$id_customer.'-'.(bool)$get_last.'-'.(int)$id_guest;
$cache_id = 'ProductComment::getByCustomer_'.(int)$id_product.'-'.(int)$id_customer.'-'.(bool)$get_last.'-'.(int)$id_guest;
if (!Cache::isStored($cache_id))
{
$results = Db::getInstance()->executeS('
@@ -214,7 +214,7 @@ class ProductComment extends ObjectModel
if (!Validate::isUnsignedId($id_product))
die(Tools::displayError());
$validate = (int)Configuration::get('PRODUCT_COMMENTS_MODERATE');
$cache_id = __CLASS__.__FUNCTION__.(int)$id_product.'-'.$validate;
$cache_id = 'ProductComment::getCommentNumber_'.(int)$id_product.'-'.$validate;
if (!Cache::isStored($cache_id))
{
$result = (int)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('