From bbcd51e7c6cb04c1ba525c64c337461cf45ce110 Mon Sep 17 00:00:00 2001 From: Baoshuo Date: Sat, 8 Oct 2022 17:16:00 +0800 Subject: [PATCH] fix(web/blog/slide): replace state --- .../subdomain/blog/slide_write.php | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/web/app/controllers/subdomain/blog/slide_write.php b/web/app/controllers/subdomain/blog/slide_write.php index 46520bb..3e20af8 100644 --- a/web/app/controllers/subdomain/blog/slide_write.php +++ b/web/app/controllers/subdomain/blog/slide_write.php @@ -17,6 +17,10 @@ become404Page(); } } + + if (!isset($_COOKIE['bootstrap4'])) { + $REQUIRE_LIB['bootstrap5'] = ''; + } $blog_editor = new UOJBlogEditor(); $blog_editor->type = 'slide'; @@ -59,6 +63,8 @@ } else { insertSlide($data); $blog = array('id' => DB::insert_id(), 'tags' => array()); + $ret['blog_write_url'] = HTML::blog_url(UOJContext::user()['username'], "/slide/{$blog['id']}/write"); + $ret['blog_url'] = HTML::blog_url(UOJContext::user()['username'], "/slide/{$blog['id']}"); } if ($data['tags'] !== $blog['tags']) { DB::delete("delete from blogs_tags where blog_id = {$blog['id']}"); @@ -72,8 +78,17 @@ $blog_editor->runAtServer(); ?> -
-这玩意儿怎么用? + printHTML() ?>