Fix copy and paste mistake deleting cover photos on Favicon update
authorTim Düsterhus <duesterhus@woltlab.com>
Thu, 23 Jul 2020 12:13:37 +0000 (14:13 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Thu, 23 Jul 2020 12:13:37 +0000 (14:13 +0200)
wcfsetup/install/files/lib/data/style/StyleAction.class.php

index 0be2b7f57e4b060b20c7fbeafe1be6c5164ad9b1..a8568c4f5ecfc4e7d40e3046e391e8b09e251c20 100644 (file)
@@ -305,11 +305,6 @@ class StyleAction extends AbstractDatabaseObjectAction implements IToggleAction
                        /** @var \wcf\system\file\upload\UploadFile $file */
                        $file = $this->parameters['uploads']['favicon'];
                        
-                       if ($style->coverPhotoExtension && file_exists($style->getCoverPhotoLocation())) {
-                               if (!$file || $style->getCoverPhotoLocation() !== $file->getLocation()) {
-                                       unlink($style->getCoverPhotoLocation());
-                               }
-                       }
                        if ($file !== null) {
                                $fileLocation = $file->getLocation();
                                if (($imageData = getimagesize($fileLocation)) === false) {