Debug
This commit is contained in:
@@ -1 +1 @@
|
|||||||
1.2.25
|
1.2.26
|
||||||
@@ -1324,6 +1324,33 @@ class ApiKernel
|
|||||||
$contentId = (int)$this->val($this->in, ['content_id', 'content'], 0);
|
$contentId = (int)$this->val($this->in, ['content_id', 'content'], 0);
|
||||||
if ($contentId <= 0) $this->fail('content_id required', null, 422);
|
if ($contentId <= 0) $this->fail('content_id required', null, 422);
|
||||||
|
|
||||||
|
$refsDebug = [];
|
||||||
|
$refs = $this->findTemplateReferences($customerId, $contentId, $refsDebug);
|
||||||
|
if (!empty($refsDebug)) {
|
||||||
|
$this->writeDebugLog('templates_references_debug', $refsDebug);
|
||||||
|
}
|
||||||
|
if (!empty($refs)) {
|
||||||
|
debug_log_write('templates_toggle', [
|
||||||
|
'time' => date(DATE_ATOM),
|
||||||
|
'action' => 'content_versions.deactivate.blocked',
|
||||||
|
'customer_id' => $customerId,
|
||||||
|
'content_id' => $contentId,
|
||||||
|
'references' => $refs,
|
||||||
|
'input' => $this->in,
|
||||||
|
], [
|
||||||
|
'append' => true,
|
||||||
|
'json' => true,
|
||||||
|
'newline' => true,
|
||||||
|
]);
|
||||||
|
$this->respond([
|
||||||
|
'ok' => false,
|
||||||
|
'error' => 'Template wird in anderen Templates verwendet',
|
||||||
|
'content_id' => $contentId,
|
||||||
|
'count' => count($refs),
|
||||||
|
'references' => $refs,
|
||||||
|
], 409);
|
||||||
|
}
|
||||||
|
|
||||||
$ok = $this->deactivateContentVersion($customerId, $contentId);
|
$ok = $this->deactivateContentVersion($customerId, $contentId);
|
||||||
debug_log_write('templates_toggle', [
|
debug_log_write('templates_toggle', [
|
||||||
'time' => date(DATE_ATOM),
|
'time' => date(DATE_ATOM),
|
||||||
|
|||||||
Reference in New Issue
Block a user