From: Matthias Schmidt Date: Tue, 24 Feb 2015 17:38:16 +0000 (+0100) Subject: Add category API to react to changed parent category (2) X-Git-Tag: 2.1.0~33^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3ff01f56629dd1b3157ebb3d4799e803ce1f17e6;p=GitHub%2FWoltLab%2FWCF.git Add category API to react to changed parent category (2) --- diff --git a/wcfsetup/install/files/lib/data/category/CategoryAction.class.php b/wcfsetup/install/files/lib/data/category/CategoryAction.class.php index 547e4cdf2d..c3a8993735 100644 --- a/wcfsetup/install/files/lib/data/category/CategoryAction.class.php +++ b/wcfsetup/install/files/lib/data/category/CategoryAction.class.php @@ -92,7 +92,7 @@ class CategoryAction extends AbstractDatabaseObjectAction implements ISortableAc parent::update(); - if ($this->parameters['data']['parentCategoryID']) { + if (isset($this->parameters['data']['parentCategoryID'])) { $objectType = null; $parentUpdates = array(); @@ -102,7 +102,7 @@ class CategoryAction extends AbstractDatabaseObjectAction implements ISortableAc } if ($category->parentCategoryID != $this->parameters['data']['parentCategoryID']) { - $parentUpdates[$categoryID] = array( + $parentUpdates[$category->categoryID] = array( 'oldParentCategoryID' => $category->parentCategoryID, 'newParentCategoryID' => $this->parameters['data']['parentCategoryID'] );