Permalink
Browse files

Quote field names in rename in order to allow renaming of reserved wo…

…rds.
  • Loading branch information...
1 parent a54d16e commit fec5fe881ed8f59b02041b9305aa7099f841a05a stronk7 committed Jan 28, 2007
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/xmldb/classes/generators/XMLDBGenerator.class.php
@@ -667,8 +667,8 @@ function getRenameFieldSQL($xmldb_table, $xmldb_field, $newname) {
}
$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;

0 comments on commit fec5fe8

Please sign in to comment.