From 44b008735666e88d7e6d612879db3c5b7c0cee58 Mon Sep 17 00:00:00 2001 From: Baoshuo Date: Tue, 22 Nov 2022 16:30:09 +0800 Subject: [PATCH] fix(web/list/new): list content --- web/app/controllers/lists.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/web/app/controllers/lists.php b/web/app/controllers/lists.php index 6924afe..96babbf 100644 --- a/web/app/controllers/lists.php +++ b/web/app/controllers/lists.php @@ -12,6 +12,8 @@ if (UOJList::userCanCreateList(Auth::user())) { $new_list_form = new UOJBs4Form('new_list'); $new_list_form->handle = function () { DB::insert("insert into lists (title, is_hidden) values ('未命名题单', 1)"); + $id = DB::insert_id(); + DB::insert("insert into lists_contents (id, content, content_md) values ($id, '', '')"); }; $new_list_form->submit_button_config['align'] = 'right'; $new_list_form->submit_button_config['class_str'] = 'btn btn-primary';