DB escaping comments. MDL-8918
This commit is contained in:
@@ -238,7 +238,7 @@ class XMLDBmysql extends XMLDBGenerator {
|
||||
|
||||
if ($xmldb_table->getComment()) {
|
||||
$comment .= 'ALTER TABLE ' . $this->getTableName($xmldb_table);
|
||||
$comment .= " COMMENT='" . substr($xmldb_table->getComment(), 0, 60) . "'";
|
||||
$comment .= " COMMENT='" . addslashes(substr($xmldb_table->getComment(), 0, 60)) . "'";
|
||||
}
|
||||
return array($comment);
|
||||
}
|
||||
|
||||
@@ -198,7 +198,7 @@ class XMLDBoci8po extends XMLDBgenerator {
|
||||
function getCommentSQL ($xmldb_table) {
|
||||
|
||||
$comment = "COMMENT ON TABLE " . $this->getTableName($xmldb_table);
|
||||
$comment.= " IS '" . substr($xmldb_table->getComment(), 0, 250) . "'";
|
||||
$comment.= " IS '" . addslashes(substr($xmldb_table->getComment(), 0, 250)) . "'";
|
||||
|
||||
return array($comment);
|
||||
}
|
||||
|
||||
@@ -135,7 +135,7 @@ class XMLDBpostgres7 extends XMLDBgenerator {
|
||||
function getCommentSQL ($xmldb_table) {
|
||||
|
||||
$comment = "COMMENT ON TABLE " . $this->getTableName($xmldb_table);
|
||||
$comment.= " IS '" . substr($xmldb_table->getComment(), 0, 250) . "'";
|
||||
$comment.= " IS '" . addslashes(substr($xmldb_table->getComment(), 0, 250)) . "'";
|
||||
|
||||
return array($comment);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user