From c404ff5f17b799cd493453e277202ac852439ce7 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Mon, 10 Dec 2012 16:55:36 +0100 Subject: [PATCH] Object type definitions are now globally unique Fixes #971 --- ...bjectTypeDefinitionPackageInstallationPlugin.class.php | 8 ++------ wcfsetup/setup/db/install.sql | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) 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; -- 2.20.1