[ Index ] |
PHP Cross Reference of phpBB 3.0 Beta 3 |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * 4 * @package acp 5 * @version $Id: acp_update.php,v 1.1 2006/09/02 13:39:21 acydburn Exp $ 6 * @copyright (c) 2005 phpBB Group 7 * @license http://opensource.org/licenses/gpl-license.php GNU Public License 8 * 9 */ 10 11 /** 12 * @package acp 13 */ 14 class acp_update 15 { 16 var $u_action; 17 18 function main($id, $mode) 19 { 20 global $config, $db, $user, $auth, $template, $cache; 21 global $phpbb_root_path, $phpbb_admin_path, $phpEx; 22 23 $user->add_lang('install'); 24 25 $this->tpl_name = 'acp_update'; 26 $this->page_title = 'ACP_UPDATE'; 27 28 // Get current and latest version 29 $errstr = ''; 30 $errno = 0; 31 32 $info = get_remote_file('www.phpbb.com', '/updatecheck', '30x.txt', $errstr, $errno); 33 34 if ($info === false) 35 { 36 trigger_error($errstr . adm_back_link($this->u_action)); 37 } 38 39 $info = explode("\n", $info); 40 $latest_version = trim($info[0]); 41 42 $announcement_url = trim($info[1]); 43 $update_archive_link = 'http://www.phpbb.com/files/releases/phpBB-' . $config['version'] . '_to_' . $latest_version . '.zip'; 44 $update_link = append_sid($phpbb_root_path . 'install/index.' . $phpEx, 'mode=update'); 45 46 $up_to_date = (version_compare(strtolower($config['version']), strtolower($latest_version), '<')) ? false : true; 47 48 $template->assign_vars(array( 49 'S_UP_TO_DATE' => $up_to_date, 50 'S_VERSION_CHECK' => true, 51 'U_ACTION' => $this->u_action, 52 53 'LATEST_VERSION' => $latest_version, 54 'CURRENT_VERSION' => $config['version'], 55 56 'UPDATE_INSTRUCTIONS' => sprintf($user->lang['UPDATE_INSTRUCTIONS'], $announcement_url, $update_archive_link, $update_link), 57 )); 58 } 59 } 60 61 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Nov 22 00:35:05 2006 | Cross-referenced by PHPXref 0.6 |