From e44b35048af1312e75819bab6715ea89b302f4ae Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Fri, 12 Apr 2013 20:54:12 +0200 Subject: [PATCH] Fixed installation of option categories --- .../AbstractOptionPackageInstallationPlugin.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wcfsetup/install/files/lib/system/package/plugin/AbstractOptionPackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/AbstractOptionPackageInstallationPlugin.class.php index e9e4253534..ce422f22ad 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/AbstractOptionPackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/AbstractOptionPackageInstallationPlugin.class.php @@ -210,10 +210,6 @@ abstract class AbstractOptionPackageInstallationPlugin extends AbstractXMLPackag )); $row = $statement->fetchArray(); if (empty($row['categoryID'])) { - if ($row['categoryID'] != $this->installation->getPackageID()) { - throw new SystemException("Cannot override existing category '".$category['categoryName']."'"); - } - // insert new category $sql = "INSERT INTO wcf".WCF_N."_".$this->tableName."_category (packageID, categoryName, parentCategoryName, permissions, @@ -233,6 +229,10 @@ abstract class AbstractOptionPackageInstallationPlugin extends AbstractXMLPackag $statement->execute($data); } else { + if ($row['categoryID'] != $this->installation->getPackageID()) { + throw new SystemException("Cannot override existing category '".$category['categoryName']."'"); + } + // update existing category $sql = "UPDATE wcf".WCF_N."_".$this->tableName."_category SET parentCategoryName = ?, -- 2.20.1