<pip name="file">wcf\system\package\plugin\FilePackageInstallationPlugin</pip>
<pip name="language">wcf\system\package\plugin\LanguagePackageInstallationPlugin</pip>
<pip name="objectType">wcf\system\package\plugin\ObjectTypePackageInstallationPlugin</pip>
- <pip name="objectTypeDefinition">wcf\system\package\plugin\ObjectTypeDefinitionInstallationPlugin</pip>
+ <pip name="objectTypeDefinition">wcf\system\package\plugin\ObjectTypeDefinitionPackageInstallationPlugin</pip>
<pip name="option">wcf\system\package\plugin\OptionPackageInstallationPlugin</pip>
<pip name="pageMenu">wcf\system\package\plugin\PageMenuPackageInstallationPlugin</pip>
<pip name="script">wcf\system\package\plugin\ScriptPackageInstallationPlugin</pip>
*/
protected function getDefinitionID($definitionName) {
// get object type id
- $sql = "SELECT notification_object_type.definitionID
+ $sql = "SELECT object_type_definition.definitionID
FROM wcf".WCF_N."_package_dependency package_dependency,
wcf".WCF_N."_object_type_definition object_type_definition
WHERE object_type_definition.packageID = package_dependency.dependency
protected function handleDelete(array $items) {
$sql = "DELETE FROM wcf".WCF_N."_".$this->tableName."
WHERE objectType = ?
- definitionID = ?
+ AND definitionID = ?
AND packageID = ?";
$statement = WCF::getDB()->prepareStatement($sql);
foreach ($items as $item) {
protected function prepareImport(array $data) {
return array(
'definitionID' => $this->getDefinitionID($data['elements']['definitionname']),
- 'objectType' => $data['attributes']['name'],
+ 'objectType' => $data['elements']['name'],
'className' => (isset($data['elements']['classname']) ? $data['elements']['classname'] : ''),
'additionalData' => serialize(isset($data['elements']['additionaldata']) ? $data['elements']['additionaldata'] : array())
);
$sql = "SELECT *
FROM wcf".WCF_N."_".$this->tableName."
WHERE objectType = ?
- definitionID = ?
+ AND definitionID = ?
AND packageID = ?";
$parameters = array(
$data['objectType'],