From: moodler Date: Mon, 16 Oct 2006 07:32:05 +0000 (+0000) Subject: It is now no longer possible to upgrade to 1.8 or later from non-Unicode X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=47bc16f607b35548147fd76534e740e5d4dfa381;p=moodle.git It is now no longer possible to upgrade to 1.8 or later from non-Unicode Moodle. Admins get a message explaining they need to upgrade to 1.7.x first. MDL-6857 --- diff --git a/admin/index.php b/admin/index.php index 4570e516e6..cc6dcb137e 100644 --- a/admin/index.php +++ b/admin/index.php @@ -206,6 +206,12 @@ if ($CFG->version) { if ($version > $CFG->version) { // upgrade + /// If the database is not already Unicode then we do not allow upgrading! + /// Instead, we print an error telling them to upgrade to 1.7 first. MDL-6857 + if (empty($CFG->unicodedb)) { + print_error('unicodeupgradeerror', 'error', '', $version); + } + $a->oldversion = "$CFG->release ($CFG->version)"; $a->newversion = "$release ($version)"; $strdatabasechecking = get_string("databasechecking", "", $a); @@ -479,10 +485,6 @@ print_simple_box(get_string('sitemaintenancewarning', 'admin') , 'center', '60%'); } -/// Alert to display the utf-8 migration button (if !unicode yet and DB is MySQL or PG) - if (empty($CFG->unicodedb) && in_array($CFG->dbtype, array('mysql', 'postgres7'))) { - print_simple_box(get_string('unicodeupgradenotice', 'admin') , 'center', '60%'); - } /// Print slightly annoying registration button every six months ;-) /// You can set the "registered" variable to something far in the future diff --git a/lang/en_utf8/error.php b/lang/en_utf8/error.php index e44be2a811..42a3a73263 100644 --- a/lang/en_utf8/error.php +++ b/lang/en_utf8/error.php @@ -63,6 +63,7 @@ $string['sessionerroruser'] = 'Your session has timed out. Please login again.' $string['sessionerroruser2'] = 'A server error that affects your login session was detected. Please login again or restart your browser.'; $string['sessionipnomatch'] = 'Sorry, but your IP number seems to have changed from when you first logged in. This security feature prevents crackers stealing your identity while logged in to this site. Normal users should not be seeing this message - please ask the site administrator for help.'; $string['statscatchupmode'] = 'Statistics is currently in catchup mode. So far $a->daysdone day(s) have been processed and $a->dayspending are pending. Check back soon!'; +$string['unicodeupgradeerror'] = 'Sorry, but your database is not already in Unicode, and this version of Moodle is not able to migrate your database to Unicode. Please upgrade to Moodle 1.7.x first and perform the Unicode migration from the Admin page. After that is done you should be able to migrate to Moodle $a'; $string['unknowncourse'] = 'Unknown course named \"$a\"'; $string['unknownuseraction'] = 'Sorry, I do not understand this user action.'; $string['usernotaddederror'] = 'User \"$a\" not added - unknown error';