aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2007-05-17 16:33:52 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2007-05-17 16:33:52 +0000
commit34fe17f758a37a698512a992b792325f3e68d22e (patch)
tree501d988598cb9a69f4f0f6dbb6d63a3b66a170f0 /phpBB
parentbd949d0b23879a91123136f8e1153bbb6b0e5d15 (diff)
downloadforums-34fe17f758a37a698512a992b792325f3e68d22e.tar
forums-34fe17f758a37a698512a992b792325f3e68d22e.tar.gz
forums-34fe17f758a37a698512a992b792325f3e68d22e.tar.bz2
forums-34fe17f758a37a698512a992b792325f3e68d22e.tar.xz
forums-34fe17f758a37a698512a992b792325f3e68d22e.zip
so some version_compare magic. :o
git-svn-id: file:///svn/phpbb/trunk@7621 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/includes/acp/acp_update.php3
-rw-r--r--phpBB/install/database_update.php4
-rw-r--r--phpBB/install/install_update.php4
3 files changed, 5 insertions, 6 deletions
diff --git a/phpBB/includes/acp/acp_update.php b/phpBB/includes/acp/acp_update.php
index 050c547445..a1a5dbaf3a 100644
--- a/phpBB/includes/acp/acp_update.php
+++ b/phpBB/includes/acp/acp_update.php
@@ -40,10 +40,9 @@ class acp_update
$latest_version = trim($info[0]);
$announcement_url = trim($info[1]);
- $update_archive_link = 'http://www.phpbb.com/files/releases/phpBB-' . $config['version'] . '_to_' . $latest_version . '.zip';
$update_link = append_sid($phpbb_root_path . 'install/index.' . $phpEx, 'mode=update');
- $up_to_date = (version_compare(strtolower($config['version']), strtolower($latest_version), '<')) ? false : true;
+ $up_to_date = (version_compare(str_replace('rc', 'RC', strtolower($config['version'])), str_replace('rc', 'RC', strtolower($latest_version)), '<')) ? false : true;
$template->assign_vars(array(
'S_UP_TO_DATE' => $up_to_date,
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php
index ec90b4e205..10e4be3ac4 100644
--- a/phpBB/install/database_update.php
+++ b/phpBB/install/database_update.php
@@ -565,8 +565,8 @@ $db->sql_freeresult($result);
echo $lang['PREVIOUS_VERSION'] . ' :: <strong>' . $config['version'] . '</strong><br />';
echo $lang['UPDATED_VERSION'] . ' :: <strong>' . $updates_to_version . '</strong>';
-$current_version = strtolower($config['version']);
-$latest_version = strtolower($updates_to_version);
+$current_version = str_replace('rc', 'RC', strtolower($config['version']));
+$latest_version = str_replace('rc', 'RC', strtolower($updates_to_version));
$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.
diff --git a/phpBB/install/install_update.php b/phpBB/install/install_update.php
index cd24444505..bc5ce0c57c 100644
--- a/phpBB/install/install_update.php
+++ b/phpBB/install/install_update.php
@@ -137,7 +137,7 @@ class install_update extends module
// For the current version we trick a bit. ;)
$this->current_version = (!empty($config['version_update_from'])) ? $config['version_update_from'] : $config['version'];
- $up_to_date = (version_compare(strtolower($this->current_version), strtolower($this->latest_version), '<')) ? false : true;
+ $up_to_date = (version_compare(str_replace('rc', 'RC', strtolower($this->current_version)), str_replace('rc', 'RC', strtolower($this->latest_version), '<'))) ? false : true;
// Check for a valid update directory, else point the user to the phpbb.com website
if (!file_exists($phpbb_root_path . 'install/update') || !file_exists($phpbb_root_path . 'install/update/index.' . $phpEx) || !file_exists($this->old_location) || !file_exists($this->new_location))
@@ -154,7 +154,7 @@ class install_update extends module
// Make sure the update directory holds the correct information
// Since admins are able to run the update/checks more than once we only check if the current version is lower or equal than the version to which we update to.
- if (version_compare(strtolower($this->current_version), strtolower($this->update_info['version']['to']), '>'))
+ 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_ERROR' => true,