From 3facbe66327e818073ee3f5b274dfbca5951f280 Mon Sep 17 00:00:00 2001 From: stronk7 Date: Sat, 13 Jan 2007 20:06:17 +0000 Subject: [PATCH] Now help information is back again (typo in js) and, under MySQL, the script is able to change DB encoding if empty. --- install.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/install.php b/install.php index c7109d83bb..869cbd2494 100644 --- a/install.php +++ b/install.php @@ -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 -- 2.39.5