From 689f61672115198dfa753dd5126577b7dbb622fa Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Thu, 30 Jun 2022 16:12:04 +0200 Subject: [PATCH] vB5: Take `channel.category` into account when deciding on the boardType Apparently newer vBulletin 5 versions no longer set the `CANCONTAINTHREADS` bit in channel options. --- files/lib/system/exporter/VB5xExporter.class.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/files/lib/system/exporter/VB5xExporter.class.php b/files/lib/system/exporter/VB5xExporter.class.php index 048f0f4..f4cdc33 100644 --- a/files/lib/system/exporter/VB5xExporter.class.php +++ b/files/lib/system/exporter/VB5xExporter.class.php @@ -701,7 +701,10 @@ class VB5xExporter extends AbstractExporter */ public function exportBoards($offset, $limit) { - $sql = "SELECT node.*, channel.guid, channel.options AS channelOptions + $sql = "SELECT node.*, + channel.guid, + channel.options AS channelOptions, + channel.category AS isCategory FROM " . $this->databasePrefix . "node node INNER JOIN ( SELECT contenttypeid @@ -745,7 +748,7 @@ class VB5xExporter extends AbstractExporter } foreach ($this->boardCache[$parentID] as $board) { - if ($board['channelOptions'] & self::CHANNELOPTIONS_CANCONTAINTHREADS) { + if (!$board['isCategory'] || ($board['channelOptions'] & self::CHANNELOPTIONS_CANCONTAINTHREADS)) { $boardType = Board::TYPE_BOARD; } else { $boardType = Board::TYPE_CATEGORY; -- 2.20.1