Adds missing condition when updating categories' showOrder value
authorMatthias Schmidt <gravatronics@live.com>
Thu, 2 Jan 2014 18:25:51 +0000 (19:25 +0100)
committerMatthias Schmidt <gravatronics@live.com>
Thu, 2 Jan 2014 18:25:51 +0000 (19:25 +0100)
wcfsetup/install/files/lib/data/category/CategoryEditor.class.php

index 8cf89df4b3580b75d6dc22bcfc57b85fdec0e82d..7c5ee417b8229130416d2f4ce6a261f2a128087e 100644 (file)
@@ -77,11 +77,13 @@ class CategoryEditor extends DatabaseObjectEditor implements IEditableCachedObje
                                        SET     showOrder = showOrder + 1
                                        WHERE   showOrder >= ?
                                                AND showOrder < ?
+                                               AND parentCategoryID = ?
                                                AND objectTypeID = ?";
                                $statement = WCF::getDB()->prepareStatement($sql);
                                $statement->execute(array(
                                        $showOrder,
                                        $this->showOrder,
+                                       $this->parentCategoryID,
                                        $this->objectTypeID
                                ));
                        }