aewr
This commit is contained in:
@@ -954,19 +954,17 @@ class ApiKernel
|
||||
return;
|
||||
}
|
||||
|
||||
if (!empty($section['is_template'])) {
|
||||
$versionCols = array_filter([$jsonCol, $htmlCol, $craftCol, $settingsCol, $editorCol]);
|
||||
$shouldSnapshot = false;
|
||||
foreach ($versionCols as $col) {
|
||||
if (array_key_exists($col, $data)) {
|
||||
$shouldSnapshot = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ($shouldSnapshot) {
|
||||
$this->createContentVersion($current, $itemCols, $customerId, (int)($section['id'] ?? 0));
|
||||
$versionCols = array_filter([$jsonCol, $htmlCol, $craftCol, $settingsCol, $editorCol]);
|
||||
$shouldSnapshot = false;
|
||||
foreach ($versionCols as $col) {
|
||||
if (array_key_exists($col, $data)) {
|
||||
$shouldSnapshot = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ($shouldSnapshot) {
|
||||
$this->createContentVersion($current, $itemCols, $customerId, (int)($section['id'] ?? 0));
|
||||
}
|
||||
|
||||
$set = implode(',', array_map(static fn($c) => "`$c` = :$c", array_keys($data)));
|
||||
$data['id'] = $id;
|
||||
|
||||
Reference in New Issue
Block a user