From 4340e5a217e53654616add2801df244d2ca8da7b Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 10 Nov 2010 18:26:02 +0100 Subject: [PATCH] [ticket/9140] Check current board version in incremental update packages We need to use $this->current_version in this case instead of $config['version']. Otherwise the message will be displayed after the database got updated from database_update.php. Using PHPBB_VERSION from includes/constants.php is not the right selection either, because than the message is displayed after the files got updated and are checked one last time. PHPBB3-9140 --- phpBB/install/install_update.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/install/install_update.php b/phpBB/install/install_update.php index 6184cbbc33..ec76f2a407 100644 --- a/phpBB/install/install_update.php +++ b/phpBB/install/install_update.php @@ -193,13 +193,13 @@ class install_update extends module } // Check if the update files are actually meant to update from the current version - if ($config['version'] != $this->update_info['version']['from']) + if ($this->current_version != $this->update_info['version']['from']) { $this->unequal_version = true; $template->assign_vars(array( 'S_ERROR' => true, - 'ERROR_MSG' => sprintf($user->lang['INCOMPATIBLE_UPDATE_FILES'], $config['version'], $this->update_info['version']['from'], $this->update_info['version']['to']), + 'ERROR_MSG' => sprintf($user->lang['INCOMPATIBLE_UPDATE_FILES'], $this->current_version, $this->update_info['version']['from'], $this->update_info['version']['to']), )); }