aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/install/database_update.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2009-03-22 16:34:26 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2009-03-22 16:34:26 +0000
commit4cbf6bc703bdadf716197b68a89b3438247ff022 (patch)
tree952f7fe84b9428d10e4d49d535c5108e06d4640a /phpBB/install/database_update.php
parentfac9c024ff370eb4c34f7a7ffa9048732e5c74c7 (diff)
downloadforums-4cbf6bc703bdadf716197b68a89b3438247ff022.tar
forums-4cbf6bc703bdadf716197b68a89b3438247ff022.tar.gz
forums-4cbf6bc703bdadf716197b68a89b3438247ff022.tar.bz2
forums-4cbf6bc703bdadf716197b68a89b3438247ff022.tar.xz
forums-4cbf6bc703bdadf716197b68a89b3438247ff022.zip
Merge most changes from 3.0.x branch since the 25th december.
(Captcha changes for refreshing captcha image not included) git-svn-id: file:///svn/phpbb/trunk@9404 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/install/database_update.php')
-rw-r--r--phpBB/install/database_update.php26
1 files changed, 19 insertions, 7 deletions
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php
index c9dd0a523f..2eef013742 100644
--- a/phpBB/install/database_update.php
+++ b/phpBB/install/database_update.php
@@ -10,7 +10,10 @@
$updates_to_version = '3.1.0';
-// Return if we "just include it" to find out for which version the database update is responsuble for
+// Enter any version to update from to test updates. The version within the db will not be updated.
+$debug_from_version = false;
+
+// Return if we "just include it" to find out for which version the database update is responsible for
if (defined('IN_PHPBB') && defined('IN_INSTALL'))
{
return;
@@ -86,7 +89,7 @@ header('Content-type: text/html; charset=UTF-8');
<div class="panel">
<span class="corners-top"><span></span></span>
<div id="content">
- <div id="main">
+ <div id="main" class="install-body">
<h1><?php echo phpbb::$user->lang['UPDATING_TO_LATEST_STABLE']; ?></h1>
@@ -106,6 +109,12 @@ $current_version = str_replace('rc', 'RC', strtolower(phpbb::$config['version'])
$latest_version = str_replace('rc', 'RC', strtolower($updates_to_version));
$orig_version = phpbb::$config['version'];
+// Fill DB version
+if (empty(phpbb::$config['dbms_version']))
+{
+ set_config('dbms_version', phpbb::$db->sql_server_info(true));
+}
+
// 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)
{
@@ -224,11 +233,14 @@ $errored = $no_updates = false;
flush();
-// update the version
-$sql = "UPDATE " . CONFIG_TABLE . "
- SET config_value = '$updates_to_version'
- WHERE config_name = 'version'";
-_sql($sql, $errored, $error_ary);
+if ($debug_from_version === false)
+{
+ // update the version
+ $sql = "UPDATE " . CONFIG_TABLE . "
+ SET config_value = '$updates_to_version'
+ WHERE config_name = 'version'";
+ _sql($sql, $errored, $error_ary);
+}
// Reset permissions
$sql = 'UPDATE ' . USERS_TABLE . "