Fixed issues in wordpress exporter
authorMarcel Werk <burntime@woltlab.com>
Sun, 2 Oct 2016 20:57:38 +0000 (22:57 +0200)
committerMarcel Werk <burntime@woltlab.com>
Sun, 2 Oct 2016 20:57:38 +0000 (22:57 +0200)
files/lib/system/exporter/WordPress3xExporter.class.php

index 232f778ee94fd1a632c6702cfb4cbe36bd60b3c6..87ce1f8f2fbad9b976fdb825edf58639f803f96a 100644 (file)
@@ -451,24 +451,22 @@ class WordPress3xExporter extends AbstractExporter {
                        } 
                        
                        $alignment = 'none';
-                       if (strpos($matches[1], 'alignleft')) {
+                       if (strpos($matches[1], 'alignleft') !== false) {
                                $alignment = 'left';
                        }
-                       else if (strpos($matches[1], 'alignright')) {
+                       else if (strpos($matches[1], 'alignright') !== false) {
                                $alignment = 'right';
                        }
                        
-                       $size = null;
-                       if (strpos($matches[1], 'size-thumbnail')) {
+                       $size = 'original';
+                       if (strpos($matches[1], 'size-thumbnail') !== false) {
                                $size = 'small';
                        }
-                       else {
-                               if (strpos($matches[1], 'size-medium')) {
-                                       $size = 'medium';
-                               }
-                               else if (strpos($matches[1], 'size-large')) {
-                                       $size = 'large';
-                               }
+                       else if (strpos($matches[1], 'size-medium') !== false) {
+                               $size = 'medium';
+                       }
+                       else if (strpos($matches[1], 'size-large') !== false) {
+                               $size = 'large';
                        }
                        
                        $data = [$mediaID, $size, $alignment];