correctly execute database update step (detect if the version the admin wants to update to is greater than the current version even if phpbb.com says the current version is lower than the update version) which correctly updates the database for those who forgot to enable the PHPBB_QA constant for release candidates.

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10218 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen 2009-10-09 11:59:54 +00:00
parent 9ccd209930
commit d94da30c5d

View file

@ -262,6 +262,16 @@ class install_update extends module
$template->assign_var('PACKAGE_VERSION', $this->update_info['version']['to']);
}
// Since some people try to update to RC releases, but phpBB.com tells them the last version is the version they currently run
// we are faced with the updater thinking the database schema is up-to-date; which it is, but should be updated none-the-less
// We now try to cope with this by triggering the update process
if (version_compare(str_replace('rc', 'RC', strtolower($this->current_version)), str_replace('rc', 'RC', strtolower($this->update_info['version']['to'])), '<'))
{
$template->assign_vars(array(
'S_UP_TO_DATE' => false,
));
}
break;
case 'update_db':