[*] MO : productComments - It's now possible to delete comments, beside moderation
This commit is contained in:
@@ -256,6 +256,21 @@ class ProductComment extends ObjectModel
|
||||
ORDER BY pc.`date_add` DESC'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all comments
|
||||
*
|
||||
* @return array Comments
|
||||
*/
|
||||
public static function getAll()
|
||||
{
|
||||
return (Db::getInstance()->ExecuteS('
|
||||
SELECT pc.`id_product_comment`, pc.`id_product`, IF(c.id_customer, CONCAT(c.`firstname`, \' \', c.`lastname`), pc.customer_name) customer_name, pc.`content`, pc.`grade`, pc.`date_add`, pl.`name`
|
||||
FROM `'._DB_PREFIX_.'product_comment` pc
|
||||
LEFT JOIN `'._DB_PREFIX_.'customer` c ON (c.`id_customer` = pc.`id_customer`)
|
||||
LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON (pl.`id_product` = pc.`id_product` AND pl.`id_lang` = '.(int)Context::getContext()->language->id.Context::getContext()->shop->sqlLang('pl').')
|
||||
ORDER BY pc.`date_add` DESC'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate a comment
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user