Revert "Add support for brand icons for `userMenu.xml`"
authorAlexander Ebert <ebert@woltlab.com>
Wed, 20 Sep 2023 11:45:04 +0000 (13:45 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Wed, 20 Sep 2023 11:45:04 +0000 (13:45 +0200)
This reverts commit c5391e07cf9f5cc24245b79d7f0c660b13e7a2f2.

wcfsetup/install/files/lib/data/user/menu/item/UserMenuItem.class.php
wcfsetup/install/files/lib/system/package/plugin/UserMenuPackageInstallationPlugin.class.php

index 4e4a2ee0ccddacafe58e54dde2da45db5287a915..f8bac02f680487f64bab9420e434078f6de6f4a3 100644 (file)
@@ -10,8 +10,6 @@ use wcf\system\menu\user\IUserMenuItemProvider;
 use wcf\system\Regex;
 use wcf\system\request\LinkHandler;
 use wcf\system\style\FontAwesomeIcon;
-use wcf\system\style\FontAwesomeIconBrand;
-use wcf\system\style\IFontAwesomeIcon;
 use wcf\system\WCF;
 
 /**
@@ -152,14 +150,10 @@ class UserMenuItem extends ProcessibleDatabaseObject implements ITitledObject, I
     /**
      * @since 6.0
      */
-    public function getIcon(): ?IFontAwesomeIcon
+    public function getIcon(): ?FontAwesomeIcon
     {
         if ($this->iconClassName && !\str_starts_with($this->iconClassName, 'fa-')) {
-            if (\str_starts_with($this->iconClassName, '@brand:')) {
-                return FontAwesomeIconBrand::fromName(\substr($this->iconClassName, 7));
-            } else {
-                return FontAwesomeIcon::fromString($this->iconClassName);
-            }
+            return FontAwesomeIcon::fromString($this->iconClassName);
         }
 
         return FontAwesomeIcon::fromValues('bars');
index dfd8296d9161c0d6dce2b45f2ca8afead0410c6b..b126338057011732a662aa74e55f3ee2c522910f 100644 (file)
@@ -64,20 +64,12 @@ class UserMenuPackageInstallationPlugin extends AbstractMenuPackageInstallationP
     protected function getElement(\DOMXPath $xpath, array &$elements, \DOMElement $element)
     {
         if ($element->tagName === 'iconclassname') {
-            $isBrandIcon = $element->getAttribute('type') === 'brand';
-            if ($isBrandIcon) {
-                $elements['iconClassName'] = \sprintf(
-                    "@brand:%s",
-                    $element->nodeValue,
-                );
-            } else {
-                $solid = $element->getAttribute('solid');
-                $elements['iconClassName'] = \sprintf(
-                    "%s;%s",
-                    $element->nodeValue,
-                    $solid === 'true' ? 'true' : 'false'
-                );
-            }
+            $solid = $element->getAttribute('solid');
+            $elements['iconClassName'] = \sprintf(
+                "%s;%s",
+                $element->nodeValue,
+                $solid === 'true' ? 'true' : 'false'
+            );
         } else {
             $elements[$element->tagName] = $element->nodeValue;
         }