From 581cc68616325df3eef12eab60c615732aa47b7c Mon Sep 17 00:00:00 2001 From: Baoshuo Date: Tue, 17 Jan 2023 13:56:53 +0800 Subject: [PATCH] fix(problem/solutions): 5f15f832af5ce689d4e356dedcc13f7c8bbe04eb --- web/app/controllers/problem_solutions.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/web/app/controllers/problem_solutions.php b/web/app/controllers/problem_solutions.php index d4cba7f..7906e35 100644 --- a/web/app/controllers/problem_solutions.php +++ b/web/app/controllers/problem_solutions.php @@ -118,6 +118,12 @@ if (UOJProblem::cur()->userCanManage(Auth::user()) || UOJProblem::cur()->userPer $blog_id = DB::insert_id(); + DB::insert([ + "insert into problems_solutions", + DB::bracketed_fields(["problem_id", "blog_id"]), + "values", DB::tuple([UOJProblem::info('id'), $blog_id]), + ]); + redirectTo(HTML::blog_url(Auth::id(), "/post/{$blog_id}/write")); die(); };