diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2009-07-09 13:28:25 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2009-07-09 13:28:25 +0000 |
commit | 26bb3bbb6824166d05362f5516009fdf3477195f (patch) | |
tree | 5025d5122281156b0ed6554a0a02f719c8ec0a72 /phpBB/install | |
parent | 65ec5e1bb5aac292235f242fd0b1932a3ba69572 (diff) | |
download | forums-26bb3bbb6824166d05362f5516009fdf3477195f.tar forums-26bb3bbb6824166d05362f5516009fdf3477195f.tar.gz forums-26bb3bbb6824166d05362f5516009fdf3477195f.tar.bz2 forums-26bb3bbb6824166d05362f5516009fdf3477195f.tar.xz forums-26bb3bbb6824166d05362f5516009fdf3477195f.zip |
print out error if users try to update phpBB versions no longer supported with the used database update script
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9743 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/install')
-rw-r--r-- | phpBB/install/database_update.php | 53 |
1 files changed, 28 insertions, 25 deletions
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index d7398ea953..249b0a8f69 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -11,7 +11,7 @@ $updates_to_version = '3.0.6-dev'; // Enter any version to update from to test updates. The version within the db will not be updated. -$debug_from_version = '3.0.5'; +$debug_from_version = false; // Which oldest version does this updater supports? $oldest_from_version = '3.0.0'; @@ -249,28 +249,25 @@ if ($db->sql_layer == 'mysql' || $db->sql_layer == 'mysql4' || $db->sql_layer == echo '<h1>' . $lang['ERROR'] . '</h1><br />'; echo '<p>' . sprintf($lang['MYSQL_SCHEMA_UPDATE_REQUIRED'], $config['dbms_version'], $db->sql_server_info(true)) . '</p>'; -?> - </div> - </div> - <span class="corners-bottom"><span></span></span> - </div> - </div> - </div> - <div id="page-footer"> - Powered by <a href="http://www.phpbb.com/">phpBB</a> © 2000, 2002, 2005, 2007 phpBB Group - </div> -</div> - -</body> -</html> -<?php + _print_footer(); exit_handler(); exit; } } +// Now check if the user wants to update from a version we no longer support updates from +if (version_compare($current_version, $oldest_from_version, '<')) +{ + echo '<br /><br /><h1>' . $lang['ERROR'] . '</h1><br />'; + echo '<p>' . sprintf($lang['DB_UPDATE_NOT_SUPPORTED'], $oldest_from_version, $current_version) . '</p>'; + + _print_footer(); + exit_handler(); + exit; +} + // If the latest version and the current version are 'unequal', we will update the version_update_from, else we do not update anything. if ($inline_update) { @@ -455,8 +452,21 @@ add_log('admin', 'LOG_UPDATE_DATABASE', $orig_version, $updates_to_version); // Now we purge the session table as well as all cache files $cache->purge(); -?> +_print_footer(); + +garbage_collection(); + +if (function_exists('exit_handler')) +{ + exit_handler(); +} +/** +* Print out footer +*/ +function _print_footer() +{ + echo <<<EOF </div> </div> <span class="corners-bottom"><span></span></span> @@ -471,14 +481,7 @@ $cache->purge(); </body> </html> - -<?php - -garbage_collection(); - -if (function_exists('exit_handler')) -{ - exit_handler(); +EOF; } /** |