FIX: MyBB importer exposes deleted posts (#13700)

FIX: MyBB importer exposes deleted posts (#13700)

The MyBB importer exposes posts marked as deleted in MyBB. This may lead to a privacy issue.

diff --git a/script/import_scripts/mybb.rb b/script/import_scripts/mybb.rb
index 0b78cf0..2189371 100644
--- a/script/import_scripts/mybb.rb
+++ b/script/import_scripts/mybb.rb
@@ -26,6 +26,7 @@ class ImportScripts::MyBB < ImportScripts::Base
   BATCH_SIZE = 1000
   BASE = ""
   QUIET = true
+  IMPORT_DELETED_POSTS = false
 
   def initialize
     super
@@ -115,6 +116,7 @@ class ImportScripts::MyBB < ImportScripts::Base
           FROM #{TABLE_PREFIX}posts p,
                #{TABLE_PREFIX}threads t
          WHERE p.tid = t.tid
+        #{'AND (p.visible = 1 AND t.visible = 1)' unless IMPORT_DELETED_POSTS}
       ORDER BY p.dateline
          LIMIT #{BATCH_SIZE}
         OFFSET #{offset};

GitHub sha: f9aaed70202cfa5f07e7d73ee908f4843321d64d

This commit appears in #13700 which was approved by ZogStriP. It was merged by gschlager.