diff options
Diffstat (limited to 'phpBB/includes/acp')
-rw-r--r-- | phpBB/includes/acp/acp_main.php | 14 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_update.php | 11 |
2 files changed, 21 insertions, 4 deletions
diff --git a/phpBB/includes/acp/acp_main.php b/phpBB/includes/acp/acp_main.php index 7630875f47..6e7bd91a86 100644 --- a/phpBB/includes/acp/acp_main.php +++ b/phpBB/includes/acp/acp_main.php @@ -431,13 +431,23 @@ class acp_main if ($auth->acl_get('a_board')) { + /** @var \phpbb\version_helper $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) { diff --git a/phpBB/includes/acp/acp_update.php b/phpBB/includes/acp/acp_update.php index 529f0f2185..51ff4870f2 100644 --- a/phpBB/includes/acp/acp_update.php +++ b/phpBB/includes/acp/acp_update.php @@ -37,7 +37,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) { @@ -51,7 +56,7 @@ class acp_update $template->assign_block_vars('updates_available', $version_data); } - $update_link = append_sid($phpbb_root_path . 'install/index.' . $phpEx, 'mode=update'); + $update_link = append_sid($phpbb_root_path . 'install/'); $template->assign_vars(array( 'S_UP_TO_DATE' => empty($updates_available), @@ -61,6 +66,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? |