Merged from MOODLE_14_STABLE: modify_database function change - if no ; in single line sql strings, add it
This commit is contained in:
@@ -123,6 +123,10 @@ function modify_database($sqlfile='', $sqlstring='') {
|
||||
$lines = file($sqlfile);
|
||||
}
|
||||
} else {
|
||||
$sqlstring = trim($sqlstring);
|
||||
if ($sqlstring{strlen($sqlstring)-1} != ";") {
|
||||
$sqlstring .= ";"; // add it in if it's not there.
|
||||
}
|
||||
$lines[] = $sqlstring;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user