From b9def4767f077de5465e1ec4908d226d1377df8c Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Mon, 3 Jun 2019 16:48:55 +0200 Subject: [PATCH] unnecessary complicated code simplified --- wcfsetup/install/files/lib/data/category/CategoryNode.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/data/category/CategoryNode.class.php b/wcfsetup/install/files/lib/data/category/CategoryNode.class.php index 5d9c46a376..eedd62359d 100644 --- a/wcfsetup/install/files/lib/data/category/CategoryNode.class.php +++ b/wcfsetup/install/files/lib/data/category/CategoryNode.class.php @@ -169,7 +169,7 @@ class CategoryNode extends DatabaseObjectDecorator implements \RecursiveIterator * @since 5.2 */ public function isVisibleInNestedList(AbstractDecoratedCategory $activeCategory = null) { - if (!$this->getParentCategory() || ($this->getParentCategory() && !$this->getParentCategory()->getParentCategory())) { + if (!$this->getParentCategory() || !$this->getParentCategory()->getParentCategory()) { // level 1 & 2 are always visible return true; } -- 2.20.1