aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/install/install_update.php
diff options
context:
space:
mode:
authorOliver Schramm <oliver.schramm97@gmail.com>2013-07-28 02:35:01 +0200
committerOliver Schramm <oliver.schramm97@gmail.com>2013-07-28 13:55:37 +0200
commitdd875f13e875a726c9ea4654a90a74878658e423 (patch)
tree6663bfc3801d62fc93c19e5765f6b04b42305ba3 /phpBB/install/install_update.php
parentd8584877a19ece5b5d6cd1d0ec752905ef8501e7 (diff)
downloadforums-dd875f13e875a726c9ea4654a90a74878658e423.tar
forums-dd875f13e875a726c9ea4654a90a74878658e423.tar.gz
forums-dd875f13e875a726c9ea4654a90a74878658e423.tar.bz2
forums-dd875f13e875a726c9ea4654a90a74878658e423.tar.xz
forums-dd875f13e875a726c9ea4654a90a74878658e423.zip
[ticket/10917] Variable used only once so delete it
The variable $this->unequal_version was only used once and only to display the version the package updates to. To display the version it updates to makes no sense when the update files just aren't meant to update from the current version. (It's already shown in an error message) So I deleted the variable from there. Furthermore the use of version_compare makes the variable useless in that context which is why I deleted the variable from the whole file and replaced it in the relevant if statement with the old comparison. PHPBB3-10917
Diffstat (limited to 'phpBB/install/install_update.php')
-rw-r--r--phpBB/install/install_update.php8
1 files changed, 1 insertions, 7 deletions
diff --git a/phpBB/install/install_update.php b/phpBB/install/install_update.php
index e8fcabfc2d..2f3ee1c55a 100644
--- a/phpBB/install/install_update.php
+++ b/phpBB/install/install_update.php
@@ -58,7 +58,6 @@ class install_update extends module
var $new_location;
var $latest_version;
var $current_version;
- var $unequal_version;
var $update_to_version;
@@ -76,7 +75,6 @@ class install_update extends module
$this->tpl_name = 'install_update';
$this->page_title = 'UPDATE_INSTALLATION';
- $this->unequal_version = false;
$this->old_location = $phpbb_root_path . 'install/update/old/';
$this->new_location = $phpbb_root_path . 'install/update/new/';
@@ -195,8 +193,6 @@ class install_update extends module
// Check if the update files are actually meant to update from the current version
if ($this->current_version != $this->update_info['version']['from'])
{
- $this->unequal_version = true;
-
$template->assign_vars(array(
'S_ERROR' => true,
'ERROR_MSG' => sprintf($user->lang['INCOMPATIBLE_UPDATE_FILES'], $this->current_version, $this->update_info['version']['from'], $this->update_info['version']['to']),
@@ -206,8 +202,6 @@ class install_update extends module
// Check if the update files stored are for the latest version...
if (version_compare(strtolower($this->latest_version), strtolower($this->update_info['version']['to']), '>'))
{
- $this->unequal_version = true;
-
$template->assign_vars(array(
'S_WARNING' => true,
'WARNING_MSG' => sprintf($user->lang['OLD_UPDATE_FILES'], $this->update_info['version']['from'], $this->update_info['version']['to'], $this->latest_version))
@@ -294,7 +288,7 @@ class install_update extends module
);
// Print out version the update package updates to
- if ($this->unequal_version)
+ if ($this->latest_version != $this->update_info['version']['to'])
{
$template->assign_var('PACKAGE_VERSION', $this->update_info['version']['to']);
}