added check to stop installation in admin/index.php if db is not unicode MDL-6858

This commit is contained in:
toyomoyo 2006-11-10 02:42:13 +00:00
parent 5d4e4271b0
commit 83ab538806

View File

@ -142,6 +142,11 @@
/// But we prioritise install.xml (XMLDB) if present
change_db_encoding(); // first try to change db encoding to utf8
if (!setup_is_unicodedb()) {
// If could not convert successfully, throw error, and prevent installation
print_error('unicoderequired', 'admin');
}
$status = false;
if (file_exists("$CFG->libdir/db/install.xml")) {
$status = install_from_xmldb_file("$CFG->libdir/db/install.xml"); //New method