Blog cover photo import (Invision)
authorMarcel Werk <burntime@woltlab.com>
Tue, 21 Sep 2021 09:51:11 +0000 (11:51 +0200)
committerMarcel Werk <burntime@woltlab.com>
Tue, 21 Sep 2021 09:51:11 +0000 (11:51 +0200)
files/lib/system/exporter/IPB4xExporter.class.php

index 5943b68c66585ca450e4a9a019455a5221ae4256..0ad5a89e2c6579bd521a213a1b48260d6b3f7bad 100644 (file)
@@ -1532,11 +1532,17 @@ class IPB4xExporter extends AbstractExporter
                 'isFeatured' => $row['blog_pinned'],
             ];
 
+            $additionalData = [];
+            if (!empty($row['blog_cover_photo'])) {
+                $additionalData['coverPhoto'] = $this->fileSystemPath . 'uploads/' . $row['blog_cover_photo'];
+            }
+
             ImportHandler::getInstance()
                 ->getImporter('com.woltlab.blog.blog')
                 ->import(
                     $row['blog_id'],
-                    $data
+                    $data,
+                    $additionalData
                 );
         }
     }