From d94da30c5d24eef650f03ac071e088bed6521328 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Fri, 9 Oct 2009 11:59:54 +0000 Subject: [PATCH] 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 --- phpBB/install/install_update.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/phpBB/install/install_update.php b/phpBB/install/install_update.php index ab7ec35705..6adebc7a64 100644 --- a/phpBB/install/install_update.php +++ b/phpBB/install/install_update.php @@ -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':