Löschen/Deaktivierung
This commit is contained in:
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user