From: Matthias Schmidt Date: Wed, 9 Oct 2013 16:51:17 +0000 (+0200) Subject: Fixes nesting level validation during category creation X-Git-Tag: 2.0.0_Beta_11~34^2~3^2~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1a7bb81f746df594ce18aea4338db8d0999445a6;p=GitHub%2FWoltLab%2FWCF.git Fixes nesting level validation during category creation --- diff --git a/wcfsetup/install/files/lib/acp/form/AbstractCategoryAddForm.class.php b/wcfsetup/install/files/lib/acp/form/AbstractCategoryAddForm.class.php index 80c7d613e6..23adf41c04 100644 --- a/wcfsetup/install/files/lib/acp/form/AbstractCategoryAddForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/AbstractCategoryAddForm.class.php @@ -336,7 +336,7 @@ abstract class AbstractCategoryAddForm extends AbstractForm { } if ($this->objectType->getProcessor()->getMaximumNestingLevel() != -1) { - if (count($category->getParentCategories()) > $this->objectType->getProcessor()->getMaximumNestingLevel()) { + if (count($category->getParentCategories()) + 1 > $this->objectType->getProcessor()->getMaximumNestingLevel()) { throw new UserInputException('parentCategoryID', 'notValid'); } }