From 614197dd89e330da9a79f854f9ce85cd6672e213 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Fri, 1 Mar 2024 18:17:40 +0100 Subject: [PATCH] Fix obsolete 'caret-down' icon in menus The icon was incorrectly shown in all menus and all levels. --- com.woltlab.wcf/templates/__menu.tpl | 2 +- wcfsetup/install/files/lib/data/menu/Menu.class.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/com.woltlab.wcf/templates/__menu.tpl b/com.woltlab.wcf/templates/__menu.tpl index b82a58d234..a5d2b70b02 100644 --- a/com.woltlab.wcf/templates/__menu.tpl +++ b/com.woltlab.wcf/templates/__menu.tpl @@ -9,7 +9,7 @@ {if $menuItemNode->getOutstandingItems() > 0} {#$menuItemNode->getOutstandingItems()} {/if} - {if $menuItemNode->hasChildren()} + {if $menuIdentifier == 'com.woltlab.wcf.MainMenu' && $menuItemNode->hasChildren() && $menuItemNode->getDepth() == 1} {icon name='caret-down' type='solid'} {/if} diff --git a/wcfsetup/install/files/lib/data/menu/Menu.class.php b/wcfsetup/install/files/lib/data/menu/Menu.class.php index d6fddbd973..05a94d707b 100644 --- a/wcfsetup/install/files/lib/data/menu/Menu.class.php +++ b/wcfsetup/install/files/lib/data/menu/Menu.class.php @@ -89,6 +89,7 @@ class Menu extends DatabaseObject implements ITitledObject WCF::getTPL()->assign([ 'menuItemNodeList' => $this->getMenuItemNodeList(), 'menuTitle' => $this->getTitle(), + 'menuIdentifier' => $this->identifier, ]); return WCF::getTPL()->fetch('__menu'); -- 2.20.1