<definitionname>com.woltlab.wcf.importer</definitionname>
<classname><![CDATA[wcf\system\importer\UserRankImporter]]></classname>
</type>
+ <type>
+ <name>com.woltlab.wcf.label.group</name>
+ <definitionname>com.woltlab.wcf.importer</definitionname>
+ <classname><![CDATA[wcf\system\importer\LabelGroupImporter]]></classname>
+ </type>
+ <type>
+ <name>com.woltlab.wcf.label</name>
+ <definitionname>com.woltlab.wcf.importer</definitionname>
+ <classname><![CDATA[wcf\system\importer\LabelImporter]]></classname>
+ </type>
<!-- /importers -->
</import>
</data>
\ No newline at end of file
--- /dev/null
+<?php
+namespace wcf\system\importer;
+use wcf\data\label\group\LabelGroupEditor;
+use wcf\system\WCF;
+
+/**
+ * Imports label groups.
+ *
+ * @author Marcel Werk
+ * @copyright 2001-2013 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package com.woltlab.wcf
+ * @subpackage system.importer
+ * @category Community Framework
+ */
+class LabelGroupImporter implements IImporter {
+ /**
+ * @see wcf\system\importer\IImporter::import()
+ */
+ public function import($oldID, array $data, array $additionalData = array()) {
+ // save label group
+ $labelGroup = LabelGroupEditor::create($data);
+
+ // save objects
+ if (!empty($additionalData['objects'])) {
+ $sql = "INSERT INTO wcf".WCF_N."_label_group_to_object
+ (groupID, objectTypeID, objectID)
+ VALUES (?, ?, ?)";
+ $statement = WCF::getDB()->prepareStatement($sql);
+
+ foreach ($additionalData['objects'] as $objectTypeID => $objectIDs) {
+ foreach ($objectIDs as $objectID) {
+ $statement->execute(array($labelGroup->groupID, $objectTypeID, $objectID));
+ }
+ }
+ }
+
+ ImportHandler::getInstance()->saveNewID('com.woltlab.wcf.label.group', $oldID, $labelGroup->groupID);
+
+ return $labelGroup->groupID;
+ }
+}
--- /dev/null
+<?php
+namespace wcf\system\importer;
+use wcf\data\label\LabelEditor;
+use wcf\system\WCF;
+
+/**
+ * Imports labels.
+ *
+ * @author Marcel Werk
+ * @copyright 2001-2013 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package com.woltlab.wcf
+ * @subpackage system.importer
+ * @category Community Framework
+ */
+class LabelImporter implements IImporter {
+ /**
+ * @see wcf\system\importer\IImporter::import()
+ */
+ public function import($oldID, array $data, array $additionalData = array()) {
+ $label = LabelEditor::create($data);
+
+ ImportHandler::getInstance()->saveNewID('com.woltlab.wcf.label', $oldID, $label->labelID);
+
+ return $label->labelID;
+ }
+}