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();