Fixed previous commit
authorAlexander Ebert <ebert@woltlab.com>
Thu, 1 Mar 2012 14:43:30 +0000 (15:43 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 1 Mar 2012 14:43:30 +0000 (15:43 +0100)
wcfsetup/install/files/lib/data/user/option/UserOptionEditor.class.php
wcfsetup/install/files/lib/system/database/editor/MySQLDatabaseEditor.class.php

index b2e480b12562b447a762c70dde5a91492c156a35..1cfb553b902271c248832011c8d622ee7af7fb4d 100644 (file)
@@ -130,7 +130,7 @@ class UserOptionEditor extends DatabaseObjectEditor {
                        case 'birthday':
                        case 'date':
                                $column['notNull'] = true;
-                               $column['default'] = '0000-00-00';
+                               $column['default'] = "'0000-00-00'";
                                $column['length'] = 10;
                                $column['type'] = 'char';
                        break;
index 3e798dfe52248eb46a75b5349f45e433285d844a..8412c657e4b6c50cea4ae8825f2b2d0ed96becac 100644 (file)
@@ -198,7 +198,7 @@ class MySQLDatabaseEditor extends DatabaseEditor {
                // not null / null
                if (!empty($columnData['notNull'])) $definition .= " NOT NULL";
                // default
-               if (isset($columnData['default']) && $columnData['default'] !== '') $definition .= " DEFAULT '".$columnData['default']."'";
+               if (isset($columnData['default']) && $columnData['default'] !== '') $definition .= " DEFAULT ".$columnData['default'];
                // auto_increment
                if (!empty($columnData['autoIncrement'])) $definition .= " AUTO_INCREMENT";
                // key