Browse Source

Löschen von Ratings zu gelöschten Bildern

dev-contao3
Carsten Götzinger 7 years ago
parent
commit
290ac55974
  1. 2
      dca/tl_content.php

2
dca/tl_content.php

@ -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 {

Loading…
Cancel
Save