unnecessary complicated code simplified
authorMarcel Werk <burntime@woltlab.com>
Mon, 3 Jun 2019 14:48:55 +0000 (16:48 +0200)
committerMarcel Werk <burntime@woltlab.com>
Mon, 3 Jun 2019 14:48:55 +0000 (16:48 +0200)
wcfsetup/install/files/lib/data/category/CategoryNode.class.php

index 5d9c46a376440c3cebfb5a8e36be908deb38a2f7..eedd62359d81ca2c921facb39659300182c8a195 100644 (file)
@@ -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;
                }