mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 22:10:45 +02:00
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
This commit is contained in:
@@ -439,14 +439,22 @@ class acp_main
|
||||
|
||||
if ($auth->acl_get('a_board'))
|
||||
{
|
||||
/* @var $version_helper \phpbb\version_helper */
|
||||
$version_helper = $phpbb_container->get('version_helper');
|
||||
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);
|
||||
}
|
||||
|
||||
$template->assign_var('S_VERSION_UP_TO_DATE', empty($updates_available));
|
||||
$template->assign_vars(array(
|
||||
'S_VERSION_UP_TO_DATE' => empty($updates_available),
|
||||
'S_VERSION_UPGRADEABLE' => !empty($upgrades_available),
|
||||
'UPGRADE_INSTRUCTIONS' => !empty($upgrades_available) ? $user->lang('UPGRADE_INSTRUCTIONS', $upgrades_available['current'], $upgrades_available['announcement']) : false,
|
||||
));
|
||||
}
|
||||
catch (\RuntimeException $e)
|
||||
{
|
||||
|
@@ -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?
|
||||
|
Reference in New Issue
Block a user