From 41f53872db141906a85c7181147a963b19634533 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Mon, 19 Feb 2024 18:37:40 +0100 Subject: [PATCH] Fix visible items in category boxes ref https://www.woltlab.com/community/thread/303963-men%C3%BC-filebase-sidebar-auflistung-der-kategorien/ --- .../install/files/lib/data/category/CategoryNode.class.php | 7 +++++++ 1 file changed, 7 insertions(+) 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; -- 2.20.1