This commit is contained in:
2026-02-04 01:32:18 +01:00
parent b33ac3b5b7
commit 58074631de
2 changed files with 5 additions and 3 deletions

View File

@@ -1 +1 @@
1.2.38
1.2.39

View File

@@ -1104,7 +1104,7 @@ class ApiKernel
$stmt = $this->pdo->prepare($sql);
foreach ($vdata as $k => $v) $stmt->bindValue(":$k", $v);
$stmt->execute();
$updatedExistingVersion = $stmt->rowCount() > 0;
$updatedExistingVersion = true;
if ($updatedExistingVersion && $activateVersion) {
$this->activateContentVersion($customerId, (int)$id, (int)$requestedVersionId);
}
@@ -1185,9 +1185,11 @@ class ApiKernel
$select = ['`id`','`content_id`','`section_id`','`version_no`','`editor_type`','`created_at`'];
if (!empty($cols['is_active'])) $select[] = "`{$cols['is_active']}` AS is_active";
if (!empty($cols['was_active'])) $select[] = "`{$cols['was_active']}` AS was_active";
$limit = (int)$this->val($this->in, ['limit', 'per_page', 'perPage'], 0);
if ($limit <= 0 || $limit > 500) $limit = 200;
$stmt = $this->pdo->prepare(
"SELECT " . implode(',', $select) . " FROM `$table` WHERE `customer_id` = :cid AND `content_id` = :content
ORDER BY `id` DESC LIMIT 10"
ORDER BY `id` DESC LIMIT " . $limit
);
$stmt->execute([':cid' => $customerId, ':content' => $contentId]);
$rows = $stmt->fetchAll() ?: [];