From: Marcel Werk Date: Fri, 6 Mar 2015 18:02:19 +0000 (+0100) Subject: Increased maximum category depth to 3 X-Git-Tag: 2.1.2~88^2~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=013ffbb610589b9835fad85cc9df704d855321b3;p=GitHub%2FWoltLab%2FWCF.git Increased maximum category depth to 3 --- diff --git a/wcfsetup/install/files/lib/data/category/AbstractDecoratedCategory.class.php b/wcfsetup/install/files/lib/data/category/AbstractDecoratedCategory.class.php index d75566885d..00bf71513f 100644 --- a/wcfsetup/install/files/lib/data/category/AbstractDecoratedCategory.class.php +++ b/wcfsetup/install/files/lib/data/category/AbstractDecoratedCategory.class.php @@ -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. diff --git a/wcfsetup/install/files/lib/data/category/Category.class.php b/wcfsetup/install/files/lib/data/category/Category.class.php index 2f833fe296..8a346ae5f7 100644 --- a/wcfsetup/install/files/lib/data/category/Category.class.php +++ b/wcfsetup/install/files/lib/data/category/Category.class.php @@ -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() */ diff --git a/wcfsetup/install/files/style/layout.less b/wcfsetup/install/files/style/layout.less index 78caf220fb..364d4e1eeb 100644 --- a/wcfsetup/install/files/style/layout.less +++ b/wcfsetup/install/files/style/layout.less @@ -1209,10 +1209,8 @@ html[dir="rtl"] { } .sidebarNestedCategoryList { - > li { - > ol { - margin-left: @wcfGapMedium; - } + ol { + margin-left: @wcfGapMedium; } li {