diff options
author | Bart Visscher <bartv@thisnet.nl> | 2013-06-21 12:06:26 +0200 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2013-06-24 22:38:19 +0200 |
commit | fae3cf1a87b474cd84d9fdf20113f7fd3653e5e3 (patch) | |
tree | b95278e0bab11f9be08a89caa47b8b6b0f06ffbf /lib | |
parent | 769212a9a025a58a5b2189eb2461a01e0ece6d36 (diff) | |
download | nextcloud-server-fae3cf1a87b474cd84d9fdf20113f7fd3653e5e3.tar.gz nextcloud-server-fae3cf1a87b474cd84d9fdf20113f7fd3653e5e3.zip |
Always quote db identifiers in OC_DB_MDB2SchemaReader
Diffstat (limited to 'lib')
-rw-r--r-- | lib/db/mdb2schemareader.php | 7 |
1 files 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': |