Fixed label import issue
authorMarcel Werk <burntime@woltlab.com>
Mon, 8 Jul 2013 20:17:31 +0000 (22:17 +0200)
committerMarcel Werk <burntime@woltlab.com>
Mon, 8 Jul 2013 20:17:31 +0000 (22:17 +0200)
wcfsetup/install/files/lib/system/importer/LabelImporter.class.php
wcfsetup/setup/db/install.sql

index a37362f183afcb3e3020c7e4fa8d0facd5281875..b46f22a11cfbf689ecc3848696b0b0304fdb12c4 100644 (file)
@@ -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);
index f8a67d2e20e19476a9f5d40685ee5bae36ea8009..2192af1c299e98b39f4fd33b6f1a3b1f5134cc41 100644 (file)
@@ -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;