From: Kiv4h Date: Sun, 30 Dec 2012 16:05:26 +0000 (+0100) Subject: Oh lord.. -.- X-Git-Tag: 2.0.0_Beta_1~638^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ebe8e82589f19793a6bf0dfc74d51c859407760d;p=GitHub%2FWoltLab%2FWCF.git Oh lord.. -.- --- diff --git a/wcfsetup/install/files/lib/system/database/editor/MySQLDatabaseEditor.class.php b/wcfsetup/install/files/lib/system/database/editor/MySQLDatabaseEditor.class.php index 74d113c1e1..135099dc30 100644 --- a/wcfsetup/install/files/lib/system/database/editor/MySQLDatabaseEditor.class.php +++ b/wcfsetup/install/files/lib/system/database/editor/MySQLDatabaseEditor.class.php @@ -39,7 +39,7 @@ class MySQLDatabaseEditor extends DatabaseEditor { while ($row = $statement->fetchArray()) { $typeMatches = Regex::compile('([a-z]+)\(([0-9]+)\)', Regex::CASE_INSENSITIVE)->match($row['Type']); - $columns[] = array('name' => $row['Field'], 'data' => array( + $columns[] = array('name' => $row['Field'], 'data' => array( 'type' => $typeMatches[1], 'length' => $typeMatches[2], 'notNull' => (($row['Null'] == 'YES') ? true : false), @@ -47,7 +47,7 @@ class MySQLDatabaseEditor extends DatabaseEditor { 'default' => $row['Default'], 'autoIncrement' => ($row['Extra'] == 'auto_increment' ? true : false) )); - } + } return $columns; } diff --git a/wcfsetup/install/files/lib/system/database/editor/PostgreSQLDatabaseEditor.class.php b/wcfsetup/install/files/lib/system/database/editor/PostgreSQLDatabaseEditor.class.php index 3fc688a87d..51bf2519fb 100644 --- a/wcfsetup/install/files/lib/system/database/editor/PostgreSQLDatabaseEditor.class.php +++ b/wcfsetup/install/files/lib/system/database/editor/PostgreSQLDatabaseEditor.class.php @@ -49,7 +49,7 @@ class PostgreSQLDatabaseEditor extends DatabaseEditor { $statement = $this->dbObj->prepareStatement($sql); $statement->execute(array($tableName)); while ($row = $statement->fetchArray()) { - $columns[] = array('name' => $row['attname'], 'data' => array( + $columns[] = array('name' => $row['attname'], 'data' => array( 'type' => $row['typname'], 'length' => $row['attlen'], 'notNull' => $row['attnotnull'], @@ -57,7 +57,7 @@ class PostgreSQLDatabaseEditor extends DatabaseEditor { 'default' => $row['adsrc'], 'autoIncrement' => ($row['contype'] == 'p') )); - } + } return $columns; }