Fix import of soft deleted posts (MyBB)
authorTim Düsterhus <tim@bastelstu.be>
Sat, 19 Nov 2016 14:13:02 +0000 (15:13 +0100)
committerTim Düsterhus <tim@bastelstu.be>
Sat, 19 Nov 2016 14:13:33 +0000 (15:13 +0100)
files/lib/system/exporter/MyBB16xExporter.class.php

index fd840dfe5c1160c3e29952b68e97bff1df26eae3..d11ae7f294196bc7803c4d8f0ec104be0c0065c9 100644 (file)
@@ -752,7 +752,7 @@ class MyBB16xExporter extends AbstractExporter {
                                'username' => $row['username'],
                                'views' => $row['views'],
                                'isSticky' => $row['sticky'] ? 1 : 0,
-                               'isDisabled' => $row['visible'] ? 0 : 1,
+                               'isDisabled' => $row['visible'] == 0 ? 1 : 0,
                                'isClosed' => $row['closed'] ? 1 : 0,
                                'isDeleted' => $row['deletetime'] ? 1 : 0,
                                'deleteTime' => $row['deletetime']
@@ -795,7 +795,9 @@ class MyBB16xExporter extends AbstractExporter {
                                'subject' => $row['subject'],
                                'message' => self::fixBBCodes($row['message']),
                                'time' => $row['dateline'],
-                               'isDisabled' => $row['visible'] ? 0 : 1,
+                               'isDisabled' => $row['visible'] == 0 ? 1 : 0,
+                               'isDeleted' => $row['visible'] == -1 ? 1 : 0,
+                               'deleteTime' => $row['visible'] == -1 ? TIME_NOW : 0,
                                'editorID' => $row['edituid'] ?: null,
                                'editor' => $row['editor'] ?: '',
                                'lastEditTime' => $row['edittime'],