Migrate the Laysense production snapshot to LaySite 1.3
This commit is contained in:
@@ -233,7 +233,7 @@ final class SiteBackup
|
||||
$tables['site_settings'] = [['id' => 1, 'payload' => Database::json($site)]];
|
||||
foreach ($tables['sections'] as &$row) {
|
||||
PageDraft::slug($row['key'] ?? null, ['home', 'contact', 'main-content', 'primary-navigation', 'preview']);
|
||||
if (!in_array($row['style'] ?? '', ['plain', 'tinted', 'hero-links', 'layout'], true)) {
|
||||
if (!in_array($row['style'] ?? '', ['plain', 'tinted', 'hero-links', 'layout', 'about', 'projects', 'demos'], true)) {
|
||||
throw new RuntimeException('备份包含未知区块样式。');
|
||||
}
|
||||
$row['body'] = Html::sanitize($row['body'] ?? '');
|
||||
|
||||
Reference in New Issue
Block a user