[ Index ] |
PHP Cross Reference of phpBB-3.1.12-deutsch |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * 4 * This file is part of the phpBB Forum Software package. 5 * 6 * @copyright (c) phpBB Limited <https://www.phpbb.com> 7 * @license GNU General Public License, version 2 (GPL-2.0) 8 * 9 * For full copyright and license information, please see 10 * the docs/CREDITS.txt file. 11 * 12 */ 13 14 /** 15 * @ignore 16 */ 17 if (!defined('IN_PHPBB')) 18 { 19 exit; 20 } 21 22 class acp_update 23 { 24 var $u_action; 25 26 function main($id, $mode) 27 { 28 global $config, $user, $template, $request; 29 global $phpbb_root_path, $phpEx, $phpbb_container; 30 31 $user->add_lang('install'); 32 33 $this->tpl_name = 'acp_update'; 34 $this->page_title = 'ACP_VERSION_CHECK'; 35 36 $version_helper = $phpbb_container->get('version_helper'); 37 try 38 { 39 $recheck = $request->variable('versioncheck_force', false); 40 $updates_available = $version_helper->get_update_on_branch($recheck); 41 $upgrades_available = $version_helper->get_suggested_updates(); 42 if (!empty($upgrades_available)) 43 { 44 $upgrades_available = array_pop($upgrades_available); 45 } 46 } 47 catch (\RuntimeException $e) 48 { 49 $template->assign_var('S_VERSIONCHECK_FAIL', true); 50 51 $updates_available = array(); 52 } 53 54 $template->assign_block_vars('updates_available', $updates_available); 55 56 $update_link = append_sid($phpbb_root_path . 'install/'); 57 58 $template->assign_vars(array( 59 'S_UP_TO_DATE' => empty($updates_available), 60 'U_ACTION' => $this->u_action, 61 'U_VERSIONCHECK_FORCE' => append_sid($this->u_action . '&versioncheck_force=1'), 62 63 'CURRENT_VERSION' => $config['version'], 64 65 'UPDATE_INSTRUCTIONS' => sprintf($user->lang['UPDATE_INSTRUCTIONS'], $update_link), 66 'S_VERSION_UPGRADEABLE' => !empty($upgrades_available), 67 'UPGRADE_INSTRUCTIONS' => !empty($upgrades_available) ? $user->lang('UPGRADE_INSTRUCTIONS', $upgrades_available['current'], $upgrades_available['announcement']) : false, 68 )); 69 70 // Incomplete update? 71 if (phpbb_version_compare($config['version'], PHPBB_VERSION, '<')) 72 { 73 $database_update_link = append_sid($phpbb_root_path . 'install/database_update.' . $phpEx); 74 75 $template->assign_vars(array( 76 'S_UPDATE_INCOMPLETE' => true, 77 'FILES_VERSION' => PHPBB_VERSION, 78 'INCOMPLETE_INSTRUCTIONS' => $user->lang('UPDATE_INCOMPLETE_EXPLAIN', $database_update_link), 79 )); 80 } 81 } 82 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Thu Jan 11 00:25:41 2018 | Cross-referenced by PHPXref 0.7.1 |