aboutsummaryrefslogtreecommitdiff
path: root/cgi
diff options
context:
space:
mode:
authorLibravatar TDavis 2019-03-30 01:23:10 -0300
committerLibravatar TDavis 2019-03-30 01:23:10 -0300
commitb46a78ff692bc922cb373f18dad4500891f1d641 (patch)
tree7e01255f6bde51b2cead481a9e8bacabd0d97b9f /cgi
parent3ac10b9e3feab82d98ae0d398994749edbd4185f (diff)
downloadweabot-b46a78ff692bc922cb373f18dad4500891f1d641.tar.gz
weabot-b46a78ff692bc922cb373f18dad4500891f1d641.tar.xz
weabot-b46a78ff692bc922cb373f18dad4500891f1d641.zip
Mover hilos fix 4 Test 1
Diffstat (limited to 'cgi')
-rw-r--r--cgi/manage.py13
1 files 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<br>" % (newthreadid, p['parentid'])
if is_op: