]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-14622 error when unsupported version jump detected - only upgrades from 1.8.x...
authorskodak <skodak>
Wed, 30 Apr 2008 14:05:36 +0000 (14:05 +0000)
committerskodak <skodak>
Wed, 30 Apr 2008 14:05:36 +0000 (14:05 +0000)
lang/en_utf8/error.php
lib/setup.php

index 9d5fe5dd6fbe02337320f1a9b528e0960f27bccf..e8ef851b4385e4a09a524cc23aab29aefd210e61 100644 (file)
@@ -174,6 +174,7 @@ $string['unknowngroup'] = 'Unknown group \"$a\"';
 $string['unknownrole'] = 'Unknown role \"$a\"';
 $string['unknownuseraction'] = 'Sorry, I do not understand this user action.';
 $string['unsupportedevent'] = 'Unsupported event type';
+$string['upgraderequires19'] = 'ERROR: New Moodle version was installed on server, unfortunately upgrade from the previous version is not supported.<br />Please upgrade first to latest 1.9.x release. You can also return to previous version by reinstalling original files.';
 $string['urlnotdefinerss'] = 'URL not defined for rss feed';
 $string['userautherror'] = 'Unknown auth plugin.';
 $string['userauthunsupported'] = 'Auth plugin not supported here.';
index 2be58369f1e926ae456fa238134c8cbdb52fa31e..2aaa92354ff073fea6214557d8d97c2c5d80ec51 100644 (file)
@@ -291,6 +291,19 @@ global $HTTPSPAGEREQUIRED;
         @ini_set('log_errors', '1');
     }
 
+/// detect unsupported upgrade jump as soon as possible - do not change anything, do not use system functions
+    if ($CFG->version < 2007101509) {
+        echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>'.get_string('error').'</title>
+</head><body>
+<div style="text-align: center; margin-top:5em;background-color:orange;">'.get_string('upgraderequires19', 'error').'</div>
+</body></html>';
+        die;
+    }
+
 /// Shared-Memory cache init -- will set $MCACHE
 /// $MCACHE is a global object that offers at least add(), set() and delete()
 /// with similar semantics to the memcached PHP API http://php.net/memcache