Merged from MOODLE_15_STABLE - Fixes db upgrade for config_plugins failure on unquoted data - discussed at http://moodle.org/mod/forum/discuss.php?d=25122

This commit is contained in:
martinlanghoff
2005-06-07 03:41:52 +00:00
parent 953de03fc1
commit 967f5f4b12
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -1138,7 +1138,7 @@ function main_upgrade($oldversion=0) {
$newval = ($newval==1) ? 'onlogin' : 'oncreate'; // translate 0/1 to locked/unlocked
}
if (!(set_config($newkey, $newval, 'auth/'.$CFG->auth)
if (!(set_config($newkey, addslashes($newval), 'auth/'.$CFG->auth)
&& delete_records('config', 'name', $key))) {
notify("Error updating Auth configuration $key to {$CFG->auth} $newkey .");
$result = false;