Increased maximum category depth to 3
authorMarcel Werk <burntime@woltlab.com>
Fri, 6 Mar 2015 18:02:19 +0000 (19:02 +0100)
committerMarcel Werk <burntime@woltlab.com>
Fri, 6 Mar 2015 18:02:19 +0000 (19:02 +0100)
wcfsetup/install/files/lib/data/category/AbstractDecoratedCategory.class.php
wcfsetup/install/files/lib/data/category/Category.class.php
wcfsetup/install/files/style/layout.less

index d75566885d6b41c0205973ed1fde43239c50ac83..00bf71513fff975a3a6ab0660a6a84b44bd33d31 100644 (file)
@@ -88,6 +88,13 @@ abstract class AbstractDecoratedCategory extends DatabaseObjectDecorator {
                return $this->parentCategory;
        }
        
+       /**
+        * @see \wcf\data\category\Category::isParentCategory()
+        */
+       public function isParentCategory(AbstractDecoratedCategory $category) {
+               return $this->getDecoratedObject()->isParentCategory($category->getDecoratedObject());
+       }
+       
        /**
         * Returns the decorated category with the given id or null if no such
         * category exists.
index 2f833fe29647acf4ee58ed5c688b9c3069638d5e..8a346ae5f7636a3e99ce8faa4f7e3565876a3ddc 100644 (file)
@@ -159,6 +159,16 @@ class Category extends ProcessibleDatabaseObject implements IPermissionObject, I
                return $this->parentCategories;
        }
        
+       /**
+        * Returns true if given category is a parent category of this category.
+        * 
+        * @param       \wcf\data\category\Category     $category
+        * @return      boolean
+        */
+       public function isParentCategory(Category $category) {
+               return in_array($category, $this->getParentCategories());
+       }
+       
        /**
         * @see \wcf\data\IPermissionObject::getPermission()
         */
index 78caf220fb4c21052cf5a4c99dd7953e77453980..364d4e1eebcd4837c9b5403533b23773b4eb621e 100644 (file)
@@ -1209,10 +1209,8 @@ html[dir="rtl"] {
 }
 
 .sidebarNestedCategoryList {
-       > li {
-               > ol {
-                       margin-left: @wcfGapMedium;
-               }
+       ol {
+               margin-left: @wcfGapMedium;
        }
        
        li {