From: Marcel Werk Date: Fri, 12 Apr 2013 18:54:12 +0000 (+0200) Subject: Fixed installation of option categories X-Git-Tag: 2.0.0_Beta_1~373 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e44b35048af1312e75819bab6715ea89b302f4ae;p=GitHub%2FWoltLab%2FWCF.git Fixed installation of option categories --- 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 = ?,