FIX: MyBB importer exposes deleted posts (#13700)
The MyBB importer exposes posts marked as deleted in MyBB. This may lead to a privacy issue.
This commit is contained in:
parent
3cf7a3766a
commit
f9aaed7020
|
@ -26,6 +26,7 @@ class ImportScripts::MyBB < ImportScripts::Base
|
||||||
BATCH_SIZE = 1000
|
BATCH_SIZE = 1000
|
||||||
BASE = ""
|
BASE = ""
|
||||||
QUIET = true
|
QUIET = true
|
||||||
|
IMPORT_DELETED_POSTS = false
|
||||||
|
|
||||||
def initialize
|
def initialize
|
||||||
super
|
super
|
||||||
|
@ -115,6 +116,7 @@ class ImportScripts::MyBB < ImportScripts::Base
|
||||||
FROM #{TABLE_PREFIX}posts p,
|
FROM #{TABLE_PREFIX}posts p,
|
||||||
#{TABLE_PREFIX}threads t
|
#{TABLE_PREFIX}threads t
|
||||||
WHERE p.tid = t.tid
|
WHERE p.tid = t.tid
|
||||||
|
#{'AND (p.visible = 1 AND t.visible = 1)' unless IMPORT_DELETED_POSTS}
|
||||||
ORDER BY p.dateline
|
ORDER BY p.dateline
|
||||||
LIMIT #{BATCH_SIZE}
|
LIMIT #{BATCH_SIZE}
|
||||||
OFFSET #{offset};
|
OFFSET #{offset};
|
||||||
|
|
Loading…
Reference in New Issue