]> git.mjollnir.org Git - moodle.git/commitdiff
added check to stop installation in admin/index.php if db is not unicode MDL-6858
authortoyomoyo <toyomoyo>
Fri, 10 Nov 2006 02:42:13 +0000 (02:42 +0000)
committertoyomoyo <toyomoyo>
Fri, 10 Nov 2006 02:42:13 +0000 (02:42 +0000)
admin/index.php

index 09fff39e4d0885208ab09d2673f58f33c5518fba..010ed90465ec0cb0da42a185130ab459ad38c2a6 100644 (file)
     /// 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