vB 3/4: Do not import deleted threads as disabled
authorTim Düsterhus <duesterhus@woltlab.com>
Tue, 5 Sep 2023 09:24:42 +0000 (11:24 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Tue, 5 Sep 2023 09:24:42 +0000 (11:24 +0200)
files/lib/system/exporter/VB3or4xExporter.class.php

index ad2ebc177e36205690af86d91617b5750e89fef8..833cc7eff068455993ce90444f00d1b8b858661e 100644 (file)
@@ -1353,9 +1353,9 @@ class VB3or4xExporter extends AbstractExporter
                 'views' => $row['views'],
                 'isAnnouncement' => 0,
                 'isSticky' => $row['sticky'],
-                'isDisabled' => $row['visible'] == 1 ? 0 : 1, // visible = 2 is deleted
-                'isClosed' => $row['open'] == 1 ? 0 : 1, // open = 10 is redirect
+                'isDisabled' => \in_array($row['visible'], [1, 2]) ? 0 : 1,
                 'isDeleted' => $row['visible'] == 2 ? 1 : 0,
+                'isClosed' => $row['open'] == 1 ? 0 : 1, // open = 10 is redirect
                 // target thread is saved in pollid...
                 'movedThreadID' => ($row['open'] == 10 && $row['pollid']) ? $row['pollid'] : null,
                 'movedTime' => 0,