fix vbulletin importer to hide soft-deleted posts (#12057)

equal to theads posts can be soft-deleted which results in a visibile = 2 state. at the moment those posts will be imported fully visible.
This commit is contained in:
Michael Maroszek 2021-02-12 14:29:05 +01:00 committed by GitHub
parent a3c363c8f0
commit 144584aacb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -359,7 +359,7 @@ class BulkImport::VBulletin < BulkImport::Base
reply_to_post_number: reply_to_post_number,
user_id: user_id_from_imported_id(row[3]),
created_at: Time.zone.at(row[4]),
hidden: row[5] == 0,
hidden: row[5] != 1,
raw: normalize_text(row[6]),
}

View File

@ -398,7 +398,7 @@ EOM
topic_id: topic[:topic_id],
raw: raw,
created_at: parse_timestamp(post["dateline"]),
hidden: post["visible"].to_i == 0,
hidden: post["visible"].to_i != 1,
}
if parent = topic_lookup_from_imported_post_id(post["parentid"])
p[:reply_to_post_number] = parent[:post_number]

View File

@ -327,7 +327,7 @@ class ImportScripts::VBulletin < ImportScripts::Base
topic_id: topic[:topic_id],
raw: raw,
created_at: parse_timestamp(post["dateline"]),
hidden: post["visible"].to_i == 0,
hidden: post["visible"].to_i != 1,
}
if parent = topic_lookup_from_imported_post_id(post["parentid"])
p[:reply_to_post_number] = parent[:post_number]