From b46a78ff692bc922cb373f18dad4500891f1d641 Mon Sep 17 00:00:00 2001 From: TDavis Date: Sat, 30 Mar 2019 01:23:10 -0300 Subject: Mover hilos fix 4 Test 1 --- cgi/manage.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/cgi/manage.py b/cgi/manage.py index 81dcfe1..ea7d0e3 100644 --- a/cgi/manage.py +++ b/cgi/manage.py @@ -421,6 +421,7 @@ def manage(self, path_split): board = setBoard(oldboardid) oldboard = board['dir'] oldboardsubject = board['subject'] + oldboardname = board['anonymous'] # get old posts posts = FetchAll("SELECT * FROM `posts` WHERE (`id` = {0} OR `parentid` = {0}) AND `boardid` = {1} ORDER BY id ASC".format(oldthread, board['id'])) @@ -460,17 +461,21 @@ def manage(self, path_split): moved_thumbs.append(post['thumb']) if is_op: moved_cats.append(post['thumb']) - + # fix subject if necessary if post['subject'] and post['subject'] == oldboardsubject: post['subject'] = board['subject'] - + + # fix nameless posts + if post['name'] == oldboardname: + post['name'] = board['anonymous'] + # insert new post and get its new ID new_id = post.insert() - + # save the reference (BBS = post number, IB = new ID) refs[old_id] = num if board['board_type'] == '1' else new_id - + # this was an OP message += "newthread = %s parentid = %s
" % (newthreadid, p['parentid']) if is_op: -- cgit v1.2.1-18-gbd029