]> git.mjollnir.org Git - moodle.git/commitdiff
It is now no longer possible to upgrade to 1.8 or later from non-Unicode
authormoodler <moodler>
Mon, 16 Oct 2006 07:32:05 +0000 (07:32 +0000)
committermoodler <moodler>
Mon, 16 Oct 2006 07:32:05 +0000 (07:32 +0000)
Moodle.   Admins get a message explaining they need to upgrade to 1.7.x first.

MDL-6857

admin/index.php
lang/en_utf8/error.php

index 4570e516e6cecfda393d605055092a3a4a543681..cc6dcb137e4fee3ad8c547a9a1f04b0b1e915c6f 100644 (file)
     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);
         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
index e44be2a8110f4d191262b6c737a909712ff5f634..42a3a73263a2151204a7611ff93e88ce5487ccd9 100644 (file)
@@ -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';