]> git.mjollnir.org Git - moodle.git/commitdiff
Now help information is back again (typo in js) and, under MySQL, the script is
authorstronk7 <stronk7>
Sat, 13 Jan 2007 20:06:17 +0000 (20:06 +0000)
committerstronk7 <stronk7>
Sat, 13 Jan 2007 20:06:17 +0000 (20:06 +0000)
able to change DB encoding if empty.

install.php

index c7109d83bb4e031772e58f94a31153fc4e92be2a..869cbd24948225fa65b419ed113ada47cc901b68 100644 (file)
@@ -345,17 +345,16 @@ if ($INSTALL['stage'] == DATABASE) {
         } else {
         /// We have been able to connect properly, just test the database encoding now. 
         /// It must be Unicode for 1.8 installations.
-
             $encoding = '';
             switch ($INSTALL['dbtype']) {
                 case 'mysql':
-                ///Get MySQL character_set_database value
+                /// Get MySQL character_set_database value
                     $rs = $db->Execute("SHOW VARIABLES LIKE 'character_set_database'");
                     if ($rs && $rs->RecordCount() > 0) {
                         $records = $rs->GetAssoc(true);
                         $encoding = $records['character_set_database']['Value'];
-                        if (!strtoupper($encoding) == 'UTF8') {
-                            // Try to set the encoding now!
+                        if (strtoupper($encoding) != 'UTF8') {
+                        /// Try to set the encoding now!
                             if (! $db->Metatables()) {  // We have no tables so go ahead
                                 $db->Execute("ALTER DATABASE `".$INSTALL['dbname']."` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci");
                                 $rs = $db->Execute("SHOW VARIABLES LIKE 'character_set_database'");  // this works
@@ -1195,8 +1194,8 @@ function database_js() {
 function toggledbinfo() {
     //Calculate selected value
     var showid = 'mysql';
-    if (getElementById('installform').dbtype.value) {
-        showid = getElementById('installform').dbtype.value;
+    if (document.getElementById('installform').dbtype.value) {
+        showid = document.getElementById('installform').dbtype.value;
     }
     if (document.getElementById) {
         //Hide all the divs