diff options
| author | Meik Sievertsen <acydburn@phpbb.com> | 2006-12-16 13:16:22 +0000 |
|---|---|---|
| committer | Meik Sievertsen <acydburn@phpbb.com> | 2006-12-16 13:16:22 +0000 |
| commit | 6938688e75e703208bd1087be8f37383da8e3f15 (patch) | |
| tree | 7b2312a6fa0b8998f8b77450835a955d4569f779 | |
| parent | 204187187ddd3f556b67c3c78373034a73d760e7 (diff) | |
| download | forums-6938688e75e703208bd1087be8f37383da8e3f15.tar forums-6938688e75e703208bd1087be8f37383da8e3f15.tar.gz forums-6938688e75e703208bd1087be8f37383da8e3f15.tar.bz2 forums-6938688e75e703208bd1087be8f37383da8e3f15.tar.xz forums-6938688e75e703208bd1087be8f37383da8e3f15.zip | |
let set_config() calls success instead of fail if the config value already exist.
git-svn-id: file:///svn/phpbb/trunk@6773 89ea8834-ac86-4346-8a33-228a782c2dd0
| -rw-r--r-- | phpBB/install/database_update.php | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index ae52373609..0f3f5b3aa2 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -381,19 +381,25 @@ $errored = false; <p><?php echo $lang['DATABASE_TYPE']; ?> :: <strong><?php echo $db->sql_layer; ?></strong><br /> <?php -$sql = "SELECT config_value - FROM " . CONFIG_TABLE . " - WHERE config_name = 'version'"; +// To let set_config() calls success, we need to make the config array available globally +$config = array(); +$sql = 'SELECT * + FROM ' . CONFIG_TABLE; $result = $db->sql_query($sql); -$row = $db->sql_fetchrow($result); + +while ($row = $db->sql_fetchrow($result)) +{ + $config[$row['config_name']] = $row['config_value']; +} $db->sql_freeresult($result); -echo $lang['PREVIOUS_VERSION'] . ' :: <strong>' . $row['config_value'] . '</strong><br />'; + +echo $lang['PREVIOUS_VERSION'] . ' :: <strong>' . $config['version'] . '</strong><br />'; echo $lang['UPDATED_VERSION'] . ' :: <strong>' . $updates_to_version . '</strong>'; -$current_version = strtolower($row['config_value']); +$current_version = strtolower($config['version']); $latest_version = strtolower($updates_to_version); -$orig_version = $row['config_value']; +$orig_version = $config['version']; // 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) |
