From: Alexander Ebert Date: Mon, 10 Dec 2012 15:55:36 +0000 (+0100) Subject: Object type definitions are now globally unique X-Git-Tag: 2.0.0_Beta_1~719^2~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c404ff5f17b799cd493453e277202ac852439ce7;p=GitHub%2FWoltLab%2FWCF.git Object type definitions are now globally unique Fixes #971 --- diff --git a/wcfsetup/install/files/lib/system/package/plugin/ObjectTypeDefinitionPackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/ObjectTypeDefinitionPackageInstallationPlugin.class.php index 2347b385ad..0af7ed328c 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/ObjectTypeDefinitionPackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/ObjectTypeDefinitionPackageInstallationPlugin.class.php @@ -56,12 +56,8 @@ class ObjectTypeDefinitionPackageInstallationPlugin extends AbstractXMLPackageIn protected function findExistingItem(array $data) { $sql = "SELECT * FROM wcf".WCF_N."_".$this->tableName." - WHERE definitionName = ? - AND packageID = ?"; - $parameters = array( - $data['definitionName'], - $this->installation->getPackageID() - ); + WHERE definitionName = ?"; + $parameters = array($data['definitionName']); return array( 'sql' => $sql, diff --git a/wcfsetup/setup/db/install.sql b/wcfsetup/setup/db/install.sql index 218c6a056f..6c12e15dba 100644 --- a/wcfsetup/setup/db/install.sql +++ b/wcfsetup/setup/db/install.sql @@ -265,7 +265,7 @@ CREATE TABLE wcf1_object_type_definition ( packageID INT(10) NOT NULL, interfaceName VARCHAR(255) NOT NULL DEFAULT '', categoryName VARCHAR(80) NOT NULL DEFAULT '', - UNIQUE KEY definitionName (definitionName, packageID) + UNIQUE KEY definitionName (definitionName) ); DROP TABLE IF EXISTS wcf1_option;