From: Marcel Werk Date: Mon, 19 Feb 2024 17:37:40 +0000 (+0100) Subject: Fix visible items in category boxes X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=932f63be338f07a42bf077098428623cecd72a95;p=GitHub%2FWoltLab%2FWCF.git Fix visible items in category boxes ref https://www.woltlab.com/community/thread/303963-men%C3%BC-filebase-sidebar-auflistung-der-kategorien/ --- diff --git a/wcfsetup/install/files/lib/data/category/CategoryNode.class.php b/wcfsetup/install/files/lib/data/category/CategoryNode.class.php index 011cc5d61b..aa6eb22ff9 100644 --- a/wcfsetup/install/files/lib/data/category/CategoryNode.class.php +++ b/wcfsetup/install/files/lib/data/category/CategoryNode.class.php @@ -59,6 +59,13 @@ class CategoryNode extends DatabaseObjectDecorator implements IObjectTreeNode // is a direct child element of the active category return true; } + + foreach ($activeCategory->getParentCategories() as $parentCategory) { + if ($this->getParentCategory()->categoryID == $parentCategory->categoryID) { + // This is a child element of a parent category of the active category. + return true; + } + } } return false;