feat: quick create solution blog
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Baoshuo Ren 2022-09-28 20:38:16 +08:00
parent 704aceb745
commit f2226dbebf
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A
2 changed files with 7 additions and 2 deletions

View File

@ -267,6 +267,11 @@ EOD;
<div class="card-body">
<?php $add_new_solution_form->printHTML(); ?>
</div>
<div class="card-footer bg-transparent">
<a class="text-decoration-none" href="<?= HTML::blog_url(Auth::id(), '/post/new/write?title=' . urlencode('【题解】#' . $problem['id'] . '. ' . $problem['title']) . '&is_hidden=0') ?>">
快速新建文章
</a>
</div>
</div>
<?php endif ?>

View File

@ -26,11 +26,11 @@
);
} else {
$blog_editor->cur_data = array(
'title' => '新博客',
'title' => $_GET['title'] ?: '新博客',
'content_md' => '',
'content' => '',
'tags' => array(),
'is_hidden' => true
'is_hidden' => isset($_GET['is_hidden']) ? $_GET['is_hidden'] : true,
);
}
if ($blog) {