Prepare LaySite 1.5.0 canvas and publishing improvements
This commit is contained in:
+13
-11
@@ -68,17 +68,19 @@ final class Database
|
||||
(slug, name, title, description, heading, accent, lead, image, alt, actions, quicklinks)
|
||||
VALUES ('home', '首页', '我的网站', '欢迎访问我的网站。', '我的网站', '', '', '', '', '[]', '[]')")
|
||||
->execute();
|
||||
$articles = $pdo->prepare("INSERT OR IGNORE INTO pages
|
||||
(slug, name, title, description, heading, accent, lead, image, alt, actions, quicklinks)
|
||||
VALUES ('articles', '文章与动态', '文章与动态', '浏览站点发布的文章。', '文章与动态', '', '', '', '', '[]', '[]')");
|
||||
$articles->execute();
|
||||
if ($articles->rowCount() === 1) {
|
||||
$pdo->prepare("INSERT INTO sections (page_slug, key, title, lead, body, feed, position)
|
||||
VALUES ('articles', 'posts', '最新文章', '', '', ?, 0)")->execute([BlockTemplates::ARTICLE_FEED]);
|
||||
}
|
||||
$category = $pdo->prepare('INSERT OR IGNORE INTO article_categories (slug, name) VALUES (?, ?)');
|
||||
foreach (Repository::CATEGORIES as $slug => $name) {
|
||||
$category->execute([$slug, $name]);
|
||||
if ($version === 0) {
|
||||
$articles = $pdo->prepare("INSERT OR IGNORE INTO pages
|
||||
(slug, name, title, description, heading, accent, lead, image, alt, actions, quicklinks)
|
||||
VALUES ('articles', '文章与动态', '文章与动态', '浏览站点发布的文章。', '文章与动态', '', '', '', '', '[]', '[]')");
|
||||
$articles->execute();
|
||||
if ($articles->rowCount() === 1) {
|
||||
$pdo->prepare("INSERT INTO sections (page_slug, key, title, lead, body, feed, position)
|
||||
VALUES ('articles', 'posts', '最新文章', '', '', ?, 0)")->execute([BlockTemplates::ARTICLE_FEED]);
|
||||
}
|
||||
$category = $pdo->prepare('INSERT OR IGNORE INTO article_categories (slug, name) VALUES (?, ?)');
|
||||
foreach (Repository::CATEGORIES as $slug => $name) {
|
||||
$category->execute([$slug, $name]);
|
||||
}
|
||||
}
|
||||
if ($version < 2) {
|
||||
OAuthCredentials::migrateLegacy($pdo);
|
||||
|
||||
Reference in New Issue
Block a user