MDL-14622 error when unsupported version jump detected - only upgrades from 1.8.x allowed

This commit is contained in:
skodak 2008-04-30 14:05:36 +00:00
parent ac42d5c653
commit f995580108
2 changed files with 14 additions and 0 deletions

View 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.';

View 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