Ignore thumbnails when importing attachments (smf2)
authorMarcel Werk <burntime@woltlab.com>
Mon, 13 May 2019 15:51:25 +0000 (17:51 +0200)
committerMarcel Werk <burntime@woltlab.com>
Mon, 13 May 2019 15:51:25 +0000 (17:51 +0200)
files/lib/system/exporter/SMF2xExporter.class.php

index 4ad296f3f702b0afd86df8daf2fe81d44c7907c2..a56527dae304aa987b2aeb7629da10ca3ac8a4f1 100644 (file)
@@ -942,6 +942,10 @@ class SMF2xExporter extends AbstractExporter {
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
                $statement->execute([0, 0]);
                while ($row = $statement->fetchArray()) {
+                       if (substr($row['filename'], -6) == '_thumb') {
+                               continue; // ignore thumbnails
+                       }
+                       
                        $fileLocation = $this->getAttachmentFilename($row['id_attach'], $row['id_folder'], $row['file_hash']);
                        
                        if ($imageSize = @getimagesize($fileLocation)) {