Löschen/Deaktivierung
This commit is contained in:
@@ -1 +1 @@
|
||||
1.2.4
|
||||
1.2.5
|
||||
@@ -1063,7 +1063,7 @@ export function initEditor() {
|
||||
function isTemplateSection() {
|
||||
if (current?.section?.is_template) return true;
|
||||
const slug = (current?.section?.slug || '').toString().toLowerCase();
|
||||
return slug === 'emailtemplate';
|
||||
return slug === 'emailtemplate' || slug.includes('template');
|
||||
}
|
||||
|
||||
async function confirmTemplateReferences(actionLabel) {
|
||||
|
||||
@@ -91,7 +91,7 @@ async function openTemplateManager(item, section) {
|
||||
const isTemplateSection = () => {
|
||||
if (section?.is_template) return true;
|
||||
const slug = (section?.slug || '').toString().toLowerCase();
|
||||
return slug === 'emailtemplate';
|
||||
return slug === 'emailtemplate' || slug.includes('template');
|
||||
};
|
||||
|
||||
const fetchTemplateReferences = async () => {
|
||||
|
||||
@@ -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