This commit is contained in:
2025-12-06 00:52:41 +01:00
parent a7006c3a4a
commit cfd9f3b4b0

View File

@@ -466,7 +466,7 @@ class ApiKernel
// --- LOGIK mit ERWEITERTER PRÜFUNG ENDE --- // --- LOGIK mit ERWEITERTER PRÜFUNG ENDE ---
$c = $this->firstExisting($allCols, ['settings_json', 'settings']); $c = $this->firstExisting($allCols, ['settings_json', 'settings']);
if ($c && $settings !== null) $data[$c] = is_string($settings) ? $settings : json_encode($settings, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); if ($c && $settings !== null) $data[$c] = is_string($settings) ? $settings : $this->encodeJson($settings);
if ($templateId !== null && in_array('template_id', $allCols, true)) $data['template_id'] = $templateId; if ($templateId !== null && in_array('template_id', $allCols, true)) $data['template_id'] = $templateId;
if ($sectionId !== null && in_array('section_id', $allCols, true)) $data['section_id'] = $sectionId; if ($sectionId !== null && in_array('section_id', $allCols, true)) $data['section_id'] = $sectionId;
@@ -533,7 +533,7 @@ class ApiKernel
$components = is_string($json) ? json_decode($json, true) : $json; $components = is_string($json) ? json_decode($json, true) : $json;
if (is_array($components)) { if (is_array($components)) {
$components = $this->cleanReferenceComponents($components); // BEREINIGUNG $components = $this->cleanReferenceComponents($components); // BEREINIGUNG
$data[$jsonDbCol] = json_encode($components, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); $data[$jsonDbCol] = $this->encodeJson($components);
} else { } else {
$data[$jsonDbCol] = is_string($json) ? $json : ''; $data[$jsonDbCol] = is_string($json) ? $json : '';
} }
@@ -557,7 +557,7 @@ class ApiKernel
// --- LOGIK mit ERWEITERTER PRÜFUNG ENDE --- // --- LOGIK mit ERWEITERTER PRÜFUNG ENDE ---
$c = $this->firstExisting($allCols, ['settings_json', 'settings']); $c = $this->firstExisting($allCols, ['settings_json', 'settings']);
if ($settings !== null && $c) $data[$c] = is_string($settings) ? $settings : json_encode($settings, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); if ($settings !== null && $c) $data[$c] = is_string($settings) ? $settings : $this->encodeJson($settings);
$tpl = $this->val($this->in, ['template_id', 'tpl_id'], null); $tpl = $this->val($this->in, ['template_id', 'tpl_id'], null);
if ($tpl !== null && in_array('template_id', $allCols, true)) $data['template_id'] = $tpl; if ($tpl !== null && in_array('template_id', $allCols, true)) $data['template_id'] = $tpl;