aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/acp')
-rw-r--r--phpBB/includes/acp/acp_main.php5
-rw-r--r--phpBB/includes/acp/acp_update.php7
2 files changed, 3 insertions, 9 deletions
diff --git a/phpBB/includes/acp/acp_main.php b/phpBB/includes/acp/acp_main.php
index 60cebe3c08..68445d814f 100644
--- a/phpBB/includes/acp/acp_main.php
+++ b/phpBB/includes/acp/acp_main.php
@@ -415,11 +415,8 @@ class acp_main
{
$latest_version_info = explode("\n", $latest_version_info);
- $latest_version = str_replace('rc', 'RC', strtolower(trim($latest_version_info[0])));
- $current_version = str_replace('rc', 'RC', strtolower($config['version']));
-
$template->assign_vars(array(
- 'S_VERSION_UP_TO_DATE' => version_compare($current_version, $latest_version, '<') ? false : true,
+ 'S_VERSION_UP_TO_DATE' => phpbb_version_compare(trim($latest_version_info[0]), $config['version'], '<='),
));
}
diff --git a/phpBB/includes/acp/acp_update.php b/phpBB/includes/acp/acp_update.php
index b0ce8f1084..931fa53165 100644
--- a/phpBB/includes/acp/acp_update.php
+++ b/phpBB/includes/acp/acp_update.php
@@ -69,12 +69,9 @@ class acp_update
$current_version = (!empty($version_update_from)) ? $version_update_from : $config['version'];
- $up_to_date_automatic = (version_compare(str_replace('rc', 'RC', strtolower($current_version)), str_replace('rc', 'RC', 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,
- 'S_UP_TO_DATE_AUTO' => $up_to_date_automatic,
+ 'S_UP_TO_DATE' => phpbb_version_compare($latest_version, $config['version'], '<='),
+ 'S_UP_TO_DATE_AUTO' => phpbb_version_compare($latest_version, $current_version, '<='),
'S_VERSION_CHECK' => true,
'U_ACTION' => $this->u_action,
'U_VERSIONCHECK_FORCE' => append_sid($this->u_action . '&amp;versioncheck_force=1'),