aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp/acp_update.php
diff options
context:
space:
mode:
authorTristan Darricau <github@nicofuma.fr>2017-01-22 23:15:26 +0100
committerTristan Darricau <github@nicofuma.fr>2017-01-22 23:15:26 +0100
commit7c77e333138e6c705ffbfd3028ce1d2002404965 (patch)
treec0fa7de1eac82faa1cd758fe6ed92920570d311a /phpBB/includes/acp/acp_update.php
parentf7ccd7af8ef529bd8a43b8a3e0b342f9b228d961 (diff)
parent085a839963b61e9812aa06601b1ffeb2eb077ab9 (diff)
downloadforums-7c77e333138e6c705ffbfd3028ce1d2002404965.tar
forums-7c77e333138e6c705ffbfd3028ce1d2002404965.tar.gz
forums-7c77e333138e6c705ffbfd3028ce1d2002404965.tar.bz2
forums-7c77e333138e6c705ffbfd3028ce1d2002404965.tar.xz
forums-7c77e333138e6c705ffbfd3028ce1d2002404965.zip
Merge branch '3.1.x' into 3.2.x
* 3.1.x: [ticket/14968] Use earlier version as written in comment [ticket/14968] Update docblock and ensure method returns array [ticket/14968] Display possible upgrade on acp index and update page [ticket/14968] Add method for retrieving updates on current branch
Diffstat (limited to 'phpBB/includes/acp/acp_update.php')
-rw-r--r--phpBB/includes/acp/acp_update.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/phpBB/includes/acp/acp_update.php b/phpBB/includes/acp/acp_update.php
index b88e6d3984..df376765f8 100644
--- a/phpBB/includes/acp/acp_update.php
+++ b/phpBB/includes/acp/acp_update.php
@@ -38,7 +38,12 @@ class acp_update
try
{
$recheck = $request->variable('versioncheck_force', false);
- $updates_available = $version_helper->get_suggested_updates($recheck);
+ $updates_available = $version_helper->get_update_on_branch($recheck);
+ $upgrades_available = $version_helper->get_suggested_updates();
+ if (!empty($upgrades_available))
+ {
+ $upgrades_available = array_pop($upgrades_available);
+ }
}
catch (\RuntimeException $e)
{
@@ -62,6 +67,8 @@ class acp_update
'CURRENT_VERSION' => $config['version'],
'UPDATE_INSTRUCTIONS' => sprintf($user->lang['UPDATE_INSTRUCTIONS'], $update_link),
+ 'S_VERSION_UPGRADEABLE' => !empty($upgrades_available),
+ 'UPGRADE_INSTRUCTIONS' => !empty($upgrades_available) ? $user->lang('UPGRADE_INSTRUCTIONS', $upgrades_available['current'], $upgrades_available['announcement']) : false,
));
// Incomplete update?