Fix export of style preview images
authorTim Düsterhus <duesterhus@woltlab.com>
Thu, 23 Jul 2020 09:27:41 +0000 (11:27 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Thu, 23 Jul 2020 09:27:41 +0000 (11:27 +0200)
wcfsetup/install/files/lib/data/style/StyleEditor.class.php

index 83ddc32c902b77becb8e11f674cf0d0ef4ed5af1..5b08121955e604e601bcc34a4e20b532f1257e02 100644 (file)
@@ -778,8 +778,8 @@ class StyleEditor extends DatabaseObjectEditor implements IEditableCachedObject
                $xml->writeElement('date', $this->styleDate);
                $xml->writeElement('version', $this->styleVersion);
                $xml->writeElement('apiVersion', $this->apiVersion);
-               if ($this->image) $xml->writeElement('image', $this->image);
-               if ($this->image2x) $xml->writeElement('image2x', $this->image2x);
+               if ($this->image) $xml->writeElement('image', basename($this->image));
+               if ($this->image2x) $xml->writeElement('image2x', basename($this->image2x));
                if ($coverPhoto) $xml->writeElement('coverPhoto', basename(FileUtil::unifyDirSeparator($coverPhoto)));
                if ($this->copyright) $xml->writeElement('copyright', $this->copyright);
                if ($this->license) $xml->writeElement('license', $this->license);