mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-22 08:18:41 +00:00
fix(blog/write/slide): insertSlide()
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
33522fe8a2
commit
025ec365c4
@ -42,19 +42,16 @@ if ($blog) {
|
|||||||
$blog_editor->blog_url = null;
|
$blog_editor->blog_url = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
function insertBlog($data) {
|
function insertSlide($data) {
|
||||||
DB::insert([
|
DB::insert([
|
||||||
"insert into blogs",
|
"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([
|
"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()
|
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) {
|
$blog_editor->save = function ($data) {
|
||||||
global $blog;
|
global $blog;
|
||||||
|
Loading…
Reference in New Issue
Block a user