From: Tim Düsterhus Date: Thu, 30 Jun 2022 14:12:04 +0000 (+0200) Subject: vB5: Take `channel.category` into account when deciding on the boardType X-Git-Tag: 5.5.0_RC_3~3^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=689f61672115198dfa753dd5126577b7dbb622fa;p=GitHub%2FWoltLab%2Fcom.woltlab.wcf.exporter.git 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. --- 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;