]> git.mjollnir.org Git - moodle.git/commitdiff
Quote field names in rename in order to allow renaming of reserved words.
authorstronk7 <stronk7>
Sun, 28 Jan 2007 00:20:54 +0000 (00:20 +0000)
committerstronk7 <stronk7>
Sun, 28 Jan 2007 00:20:54 +0000 (00:20 +0000)
lib/xmldb/classes/generators/XMLDBGenerator.class.php

index 21eb69822b6864921276c66f291f2e62ee338be0..0f91d0ac163558c005c02843cd3db5d3452a039f 100644 (file)
@@ -667,8 +667,8 @@ class XMLDBgenerator {
         }
 
         $rename = str_replace('TABLENAME', $this->getTableName($xmldb_table), $this->rename_column_sql);
-        $rename = str_replace('OLDFIELDNAME', $xmldb_field->getName(), $rename);
-        $rename = str_replace('NEWFIELDNAME', $newname, $rename);
+        $rename = str_replace('OLDFIELDNAME', $this->getEncQuoted($xmldb_field->getName()), $rename);
+        $rename = str_replace('NEWFIELDNAME', $this->getEncQuoted($newname)), $rename);
 
         $results[] = $rename;