[*] MO : Review of the productcomments module - Part3

This commit is contained in:
gBrunier
2011-08-11 12:07:25 +00:00
parent d0dbb5c185
commit abbcf84e6d
4 changed files with 73 additions and 13 deletions
@@ -281,6 +281,21 @@ class ProductComment extends ObjectModel
WHERE `id_product_comment` = '.(int)($id_product_comment)));
}
/**
* Delete usefulness
*
* @return boolean succeed
*/
public static function deleteUsefulness($id_product_comment)
{
if (!Validate::isUnsignedId($id_product_comment))
die(Tools::displayError());
return (Db::getInstance()->Execute('
DELETE FROM `'._DB_PREFIX_.'product_comment_usefulness`
WHERE `id_product_comment` = '.(int)($id_product_comment)));
}
/**
* Report comment
*