Löschen/Deaktivierung

This commit is contained in:
2026-02-01 01:43:12 +01:00
parent f98b3836ce
commit a72d50ced8
4 changed files with 5 additions and 5 deletions

View File

@@ -2350,9 +2350,9 @@ class ApiKernel
$templateItemsTable = $this->lookupTableName('template_items', 'emailtemplate_template_items');
if ($this->tableExists($templateItemsTable)) {
$sql = "SELECT DISTINCT `template_id` FROM `$templateItemsTable` WHERE `customer_id` = :cid AND `ref_type` = :rt AND `ref_id` = :rid";
$sql = "SELECT DISTINCT `template_id` FROM `$templateItemsTable` WHERE `customer_id` = :cid AND `ref_type` IN ('section','template') AND `ref_id` = :rid";
$stmt = $this->pdo->prepare($sql);
$stmt->execute([':cid' => $customerId, ':rt' => 'section', ':rid' => $templateId]);
$stmt->execute([':cid' => $customerId, ':rid' => $templateId]);
$ids = array_filter(array_map('intval', array_column($stmt->fetchAll() ?: [], 'template_id')));
if ($ids) {
if ($this->useUnifiedContent()) {