Löschen von Ratings zu gelöschten Bildern

This commit is contained in:
Carsten Götzinger 2015-02-27 22:22:49 +01:00
parent 121168f005
commit 290ac55974

View File

@ -134,6 +134,8 @@ class tl_content_rateit extends rateit\DcaHelper {
public function delete(\DC_Table $dc) {
if ($dc->activeRecord->type == "gallery") {
$this->Database->prepare("DELETE FROM tl_rateit_ratings WHERE pid IN (SELECT `id` FROM tl_rateit_items WHERE rkey LIKE ? AND typ=?)")
->execute($dc->activeRecord->id.'|%', 'galpic');
$this->Database->prepare("DELETE FROM tl_rateit_items WHERE rkey LIKE ? AND typ=?")->execute($dc->activeRecord->id.'|%', 'galpic');
return true;
} else {