From: Marcel Werk Date: Fri, 15 Mar 2024 14:29:19 +0000 (+0100) Subject: Remove obsolete code X-Git-Tag: 6.1.0_Beta_1~5 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=02c3cf7fbcef86ed79ab23eedbed9705077b7776;p=GitHub%2FWoltLab%2Fcom.woltlab.wcf.exporter.git Remove obsolete code There parameters are determined by the `MediaImporter` anyway and do not need to be given as a parameter. --- diff --git a/files/lib/system/exporter/WBB4xExporter.class.php b/files/lib/system/exporter/WBB4xExporter.class.php index fe3c66e..aac6901 100644 --- a/files/lib/system/exporter/WBB4xExporter.class.php +++ b/files/lib/system/exporter/WBB4xExporter.class.php @@ -3631,15 +3631,9 @@ final class WBB4xExporter extends AbstractExporter $data = [ 'categoryID' => (!empty($row['categoryID']) ? $row['categoryID'] : null), 'filename' => $row['filename'], - 'filesize' => $row['filesize'], - 'fileType' => $row['fileType'], - 'fileHash' => $row['fileHash'], 'uploadTime' => $row['uploadTime'], 'userID' => $row['userID'], 'username' => $row['username'], - 'isImage' => $row['isImage'], - 'width' => $row['width'], - 'height' => $row['height'], ]; $additionalData = [ diff --git a/files/lib/system/exporter/WordPress3xExporter.class.php b/files/lib/system/exporter/WordPress3xExporter.class.php index e842b16..a44c2cb 100644 --- a/files/lib/system/exporter/WordPress3xExporter.class.php +++ b/files/lib/system/exporter/WordPress3xExporter.class.php @@ -534,23 +534,6 @@ final class WordPress3xExporter extends AbstractExporter continue; } - $isImage = $width = $height = 0; - if ( - $row['post_mime_type'] == 'image/jpeg' - || $row['post_mime_type'] == 'image/png' - || $row['post_mime_type'] == 'image/gif' - ) { - $isImage = 1; - } - if ($isImage) { - $imageData = @\getimagesize($fileLocation); - if ($imageData === false) { - continue; - } - $width = $imageData[0]; - $height = $imageData[1]; - } - $time = @\strtotime($row['post_date_gmt']); if (!$time) { $time = @\strtotime($row['post_date']); @@ -558,14 +541,8 @@ final class WordPress3xExporter extends AbstractExporter $data = [ 'filename' => \basename($fileLocation), - 'filesize' => \filesize($fileLocation), - 'fileType' => $row['post_mime_type'], - 'fileHash' => \md5_file($fileLocation), 'uploadTime' => $time, 'userID' => $row['post_author'] ?: null, - 'isImage' => $isImage, - 'width' => $width, - 'height' => $height, ]; ImportHandler::getInstance()