From fae3cf1a87b474cd84d9fdf20113f7fd3653e5e3 Mon Sep 17 00:00:00 2001 From: Bart Visscher Date: Fri, 21 Jun 2013 12:06:26 +0200 Subject: [PATCH] Always quote db identifiers in OC_DB_MDB2SchemaReader --- lib/db/mdb2schemareader.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/db/mdb2schemareader.php b/lib/db/mdb2schemareader.php index 00b880a68b4..19d0ba4d4ea 100644 --- a/lib/db/mdb2schemareader.php +++ b/lib/db/mdb2schemareader.php @@ -55,6 +55,7 @@ class OC_DB_MDB2SchemaReader { case 'name': $name = (string)$child; $name = str_replace( '*dbprefix*', self::$DBTABLEPREFIX, $name ); + $name = self::$platform->quoteIdentifier($name); $table = $schema->createTable($name); break; case 'create': @@ -98,6 +99,7 @@ class OC_DB_MDB2SchemaReader { switch($child->getName()) { case 'name': $name = (string)$child; + $name = self::$platform->quoteIdentifier($name); break; case 'type': $type = (string)$child; @@ -189,10 +191,7 @@ class OC_DB_MDB2SchemaReader { switch($field->getName()) { case 'name': $field_name = (string)$field; - $keywords = self::$platform->getReservedKeywordsList(); - if ($keywords->isKeyword($field_name)) { - $field_name = self::$platform->quoteIdentifier($field_name); - } + $field_name = self::$platform->quoteIdentifier($field_name); $fields[] = $field_name; break; case 'sorting':