Fixed import issue
authorMarcel Werk <burntime@woltlab.com>
Tue, 3 Sep 2013 18:32:40 +0000 (20:32 +0200)
committerMarcel Werk <burntime@woltlab.com>
Tue, 3 Sep 2013 18:32:40 +0000 (20:32 +0200)
wcfsetup/install/files/lib/system/importer/UserOptionImporter.class.php

index cf2a69ff6aa670bc26ea6f2a2f9ba3ee927d6cc1..5b792d5e687666d36384fdc4c0104e55cc3cce79 100644 (file)
@@ -50,6 +50,12 @@ class UserOptionImporter extends AbstractImporter {
                // set temporary option name
                $data['optionName'] = StringUtil::getRandomID();
                
+               if ($data['optionType'] == 'boolean' || $data['optionType'] == 'integer') {
+                       if (isset($data['defaultValue'])) {
+                               $data['defaultValue'] = intval($data['defaultValue']);
+                       }
+               }
+               
                // save option
                $action = new UserOptionAction(array(), 'create', array('data' => $data));
                $returnValues = $action->executeAction();