mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 01:16:44 +02:00
fix for 5204
This commit is contained in:
parent
5379d24992
commit
4e93938edb
1 changed files with 10 additions and 3 deletions
|
@ -686,11 +686,18 @@ function db_migrate2utf8(){ //Eloy: Perhaps some type of limit parameter here
|
||||||
//remove the cache file!
|
//remove the cache file!
|
||||||
@unlink($CFG->dataroot.'/cache/languages');
|
@unlink($CFG->dataroot.'/cache/languages');
|
||||||
|
|
||||||
|
// Regenerate some cached data
|
||||||
|
|
||||||
|
if ($db->dbtype == 'mysql') {
|
||||||
|
$db->Execute("SET NAMES 'utf8'");
|
||||||
|
} else if ($db->dbtype == 'postgres7') {
|
||||||
|
$db->Execute("SET NAMES 'utf8'");
|
||||||
|
}
|
||||||
|
|
||||||
|
rebuild_course_cache();
|
||||||
|
|
||||||
//set the final flag
|
//set the final flag
|
||||||
migrate2utf8_set_config('unicodedb','true'); //this is the main flag for unicode db
|
migrate2utf8_set_config('unicodedb','true'); //this is the main flag for unicode db
|
||||||
|
|
||||||
// Regenerate some cached data
|
|
||||||
rebuild_course_cache();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue