Prepare LaySite 1.4.5 site icons, Head settings and release images

This commit is contained in:
2026-11-27 21:21:41 +08:00
parent 1609e7fc39
commit 00e8a70e06
34 changed files with 686 additions and 36 deletions
+3 -2
View File
@@ -133,12 +133,13 @@ final class Repository
{
Database::write(function (PDO $pdo) use ($slug, $data, $version, $sections, $replaceDraftSections, $sectionOrder): void {
$query = $pdo->prepare('UPDATE pages SET name = ?, title = ?, description = ?, heading = ?, accent = ?, lead = ?,
image = ?, alt = ?, image_scale = ?, alignments = ?, actions = ?, quicklinks = ?, visibility = ?, header_id = ?, footer_id = ?, palette_id = ?, status = ?, updated_at = ?, presentation = COALESCE(?, presentation), version = version + 1 WHERE slug = ? AND version = ?');
image = ?, alt = ?, image_scale = ?, alignments = ?, actions = ?, quicklinks = ?, visibility = ?, header_id = ?, footer_id = ?, palette_id = ?, status = ?, updated_at = ?,
presentation = COALESCE(?, presentation), head_html = COALESCE(?, head_html), version = version + 1 WHERE slug = ? AND version = ?');
$query->execute([
$data['name'], $data['title'], $data['description'], $data['heading'], $data['accent'], $data['lead'],
$data['image'], $data['alt'], $data['image_scale'], Database::json($data['alignments']), Database::json($data['actions']), Database::json($data['quicklinks']),
Database::json($data['visibility']), $data['header_id'], $data['footer_id'], $data['palette_id'], $data['status'], self::now(),
isset($data['presentation']) ? CanvasStyle::encode($data['presentation']) : null, $slug, $version,
isset($data['presentation']) ? CanvasStyle::encode($data['presentation']) : null, $data['head_html'] ?? null, $slug, $version,
]);
self::checkVersion($query->rowCount());
if ($data['status'] === 'draft' && str_starts_with($slug, 'system--')) {