fix(blog/write/slide): insertSlide()
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Baoshuo Ren 2023-02-17 18:34:16 +08:00
parent 33522fe8a2
commit 025ec365c4
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A

View File

@ -42,19 +42,16 @@ if ($blog) {
$blog_editor->blog_url = null;
}
function insertBlog($data) {
function insertSlide($data) {
DB::insert([
"insert into blogs",
"(title, content, content_md, poster, is_hidden, post_time, active_time)",
"(type, title, content, content_md, poster, is_hidden, post_time, active_time)",
"values", DB::tuple([
$data['title'], $data['content'], $data['content_md'],
"S", $data['title'], $data['content'], $data['content_md'],
UOJUserBlog::id(), $data['is_hidden'], DB::now(), DB::now()
])
]);
}
function insertSlide($data) {
DB::insert("insert into blogs (type, title, content, content_md, poster, is_hidden, post_time) values ('S', '" . DB::escape($data['title']) . "', '" . DB::escape($data['content']) . "', '" . DB::escape($data['content_md']) . "', '" . Auth::id() . "', {$data['is_hidden']}, now())");
}
$blog_editor->save = function ($data) {
global $blog;