Remove legacy `-o` suffix from icon name in UploadFile::getIconName()
authorTim Düsterhus <duesterhus@woltlab.com>
Fri, 14 Apr 2023 10:50:19 +0000 (12:50 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Fri, 14 Apr 2023 10:50:19 +0000 (12:50 +0200)
Fixes #5406

wcfsetup/install/files/lib/system/file/upload/UploadFile.class.php

index 6d57c5dec0ba97c60593feb96df7dd4ffd65dd02..590beafc0f351e022df94f028e659304086337cc 100644 (file)
@@ -276,13 +276,11 @@ class UploadFile
 
     /**
      * Returns icon name for this attachment.
-     *
-     * @return      string
      */
-    public function getIconName()
+    public function getIconName(): string
     {
         if ($iconName = FileUtil::getIconNameByFilename($this->filename)) {
-            return 'file-' . $iconName . '-o';
+            return \sprintf('file-%s', $iconName);
         }
 
         return 'paperclip';