Add import of missing board columns (woltlab forum)
authorMarcel Werk <burntime@woltlab.com>
Wed, 19 Apr 2023 16:20:14 +0000 (18:20 +0200)
committerMarcel Werk <burntime@woltlab.com>
Wed, 19 Apr 2023 16:20:14 +0000 (18:20 +0200)
Closes #76

files/lib/system/exporter/WBB4xExporter.class.php

index 5dadbde990f2e5917bbdc940c26bb86146c62558..222ca2c4170156202c0c4d73fabc720cafa64bcd 100644 (file)
@@ -257,8 +257,7 @@ final class WBB4xExporter extends AbstractExporter
             if (\in_array($item, $this->selectedData)) {
                 if (
                     empty($this->fileSystemPath)
-                    || (
-                        !@\file_exists($this->fileSystemPath . 'lib/core.functions.php')
+                    || (!@\file_exists($this->fileSystemPath . 'lib/core.functions.php')
                         && !@\file_exists($this->fileSystemPath . 'wcf/lib/core.functions.php')
                     )
                 ) {
@@ -1232,12 +1231,14 @@ final class WBB4xExporter extends AbstractExporter
                 'descriptionUseHtml' => $board['descriptionUseHtml'],
                 'externalURL' => $board['externalURL'],
                 'time' => $board['time'],
+                'metaDescription' => $board['metaDescription'] ?? '',
                 'countUserPosts' => $board['countUserPosts'],
                 'daysPrune' => $board['daysPrune'],
                 'enableMarkingAsDone' => $board['enableMarkingAsDone'],
                 'ignorable' => $board['ignorable'],
                 'isClosed' => $board['isClosed'],
                 'isInvisible' => $board['isInvisible'],
+                'isPrivate' => $board['isPrivate'] ?? 0,
                 'postSortOrder' => $board['postSortOrder'],
                 'postsPerPage' => $board['postsPerPage'],
                 'searchable' => $board['searchable'],
@@ -1246,6 +1247,7 @@ final class WBB4xExporter extends AbstractExporter
                 'sortField' => $board['sortField'],
                 'sortOrder' => $board['sortOrder'],
                 'threadsPerPage' => $board['threadsPerPage'],
+                'enableBestAnswer' => $board['enableBestAnswer'] ?? 0,
                 'clicks' => $board['clicks'],
                 'posts' => $board['posts'],
                 'threads' => $board['threads'],
@@ -2095,7 +2097,7 @@ final class WBB4xExporter extends AbstractExporter
         $conditionBuilder = new PreparedStatementConditionBuilder();
         $conditionBuilder->add('entryID IN (?)', [$entryIDs]);
 
-        $sql = "SELECT  * 
+        $sql = "SELECT  *
                 FROM    blog" . $this->dbNo . "_entry_to_category
                 " . $conditionBuilder;
         $statement = $this->database->prepareStatement($sql);