From 221eee4bba6cdb11e93e9d7075d5cdf729405833 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Mon, 8 Jul 2013 22:17:31 +0200 Subject: [PATCH] Fixed label import issue --- .../install/files/lib/system/importer/LabelImporter.class.php | 3 +++ wcfsetup/setup/db/install.sql | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/system/importer/LabelImporter.class.php b/wcfsetup/install/files/lib/system/importer/LabelImporter.class.php index a37362f183..b46f22a11c 100644 --- a/wcfsetup/install/files/lib/system/importer/LabelImporter.class.php +++ b/wcfsetup/install/files/lib/system/importer/LabelImporter.class.php @@ -18,6 +18,9 @@ class LabelImporter implements IImporter { * @see wcf\system\importer\IImporter::import() */ public function import($oldID, array $data, array $additionalData = array()) { + $data['groupID'] = ImportHandler::getInstance()->getNewID('com.woltlab.wcf.label.group', $data['groupID']); + if (!$data['groupID']) return 0; + $label = LabelEditor::create($data); ImportHandler::getInstance()->saveNewID('com.woltlab.wcf.label', $oldID, $label->labelID); diff --git a/wcfsetup/setup/db/install.sql b/wcfsetup/setup/db/install.sql index f8a67d2e20..2192af1c29 100644 --- a/wcfsetup/setup/db/install.sql +++ b/wcfsetup/setup/db/install.sql @@ -339,7 +339,7 @@ CREATE TABLE wcf1_label ( labelID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY, groupID INT(10) NOT NULL, label VARCHAR(80) NOT NULL, - cssClassName VARCHAR(255) NOT NULL + cssClassName VARCHAR(255) NOT NULL DEFAULT '' ); DROP TABLE IF EXISTS wcf1_label_group; -- 2.20.1