From 2a69d50d6d9a27abe246e8d3c3cebe4c4004c915 Mon Sep 17 00:00:00 2001 From: Baoshuo Date: Mon, 7 Nov 2022 06:30:50 +0800 Subject: [PATCH] fix(web/blog/write): new blog url --- web/app/controllers/subdomain/blog/blog_write.php | 2 +- web/app/controllers/subdomain/blog/slide_write.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/web/app/controllers/subdomain/blog/blog_write.php b/web/app/controllers/subdomain/blog/blog_write.php index a985511..1a09042 100644 --- a/web/app/controllers/subdomain/blog/blog_write.php +++ b/web/app/controllers/subdomain/blog/blog_write.php @@ -73,7 +73,7 @@ $blog_editor->save = function ($data) { } else { insertBlog($data); $blog_id = DB::insert_id(); - (new UOJBlog(['id' => $blog_id, 'type' => 'B']))->setAsCur(); + UOJBlog::query(strval($blog_id))->setAsCur(); $ret['blog_id'] = $blog_id; $ret['blog_write_url'] = UOJBlog::cur()->getUriForWrite(); $ret['blog_url'] = UOJBlog::cur()->getBlogUri(); diff --git a/web/app/controllers/subdomain/blog/slide_write.php b/web/app/controllers/subdomain/blog/slide_write.php index ce87fed..da608cc 100644 --- a/web/app/controllers/subdomain/blog/slide_write.php +++ b/web/app/controllers/subdomain/blog/slide_write.php @@ -62,7 +62,7 @@ $blog_editor->save = function ($data) { } else { insertSlide($data); $blog_id = DB::insert_id(); - (new UOJBlog(['id' => $blog_id, 'type' => 'S']))->setAsCur(); + UOJBlog::query(strval($blog_id))->setAsCur(); $ret['blog_id'] = $blog_id; $ret['blog_write_url'] = UOJBlog::cur()->getUriForWrite(); $ret['blog_url'] = UOJBlog::cur()->getBlogUri();