mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-25 19:38:53 +00:00
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
This commit is contained in:
parent
204187187d
commit
6938688e75
1 changed files with 13 additions and 7 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue