asd
This commit is contained in:
@@ -1 +1 @@
|
||||
1.2.38
|
||||
1.2.39
|
||||
@@ -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() ?: [];
|
||||
|
||||
Reference in New Issue
Block a user