FIX: phpBB3 importer created invalid quote for posts (#20646)

for proper quotes (those including a valid reference to a source post), the
importer failed to yield a username, and the imported quote was broken.
This commit is contained in:
ftc2 2023-04-05 06:50:01 -05:00 committed by GitHub
parent df849e51b7
commit ad32fa5690
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -203,7 +203,8 @@ module ImportScripts::PhpBB3::BBCode
def quoted_post(xml_node)
if @quoted_post_from_post_id
post_id = to_i(xml_node.attr("post_id"))
@quoted_post_from_post_id.call(post_id) if post_id
username = quoted_username(xml_node)
@quoted_post_from_post_id.call(post_id).merge({ username: username }) if post_id && username
end
end