diff --git a/phpBB/adm/style/acp_update.html b/phpBB/adm/style/acp_update.html new file mode 100644 index 0000000000..06672f39ae --- /dev/null +++ b/phpBB/adm/style/acp_update.html @@ -0,0 +1,40 @@ + + + + + + +

{L_VERSION_CHECK}

+ +

{L_VERSION_CHECK_EXPLAIN}

+ + +
+

{L_VERSION_UP_TO_DATE_ACP}

+
+ +
+

{L_VERSION_NOT_UP_TO_DATE_ACP}

+
+ + +
+ +
+
+
{CURRENT_VERSION}
+
+
+
+
{LATEST_VERSION}
+
+
+ + + {UPDATE_INSTRUCTIONS} +

+ + + + + \ No newline at end of file diff --git a/phpBB/includes/acp/acp_update.php b/phpBB/includes/acp/acp_update.php new file mode 100644 index 0000000000..fac20449bc --- /dev/null +++ b/phpBB/includes/acp/acp_update.php @@ -0,0 +1,61 @@ +add_lang('install'); + + $this->tpl_name = 'acp_update'; + $this->page_title = 'ACP_UPDATE'; + + // Get current and latest version + $errstr = ''; + $errno = 0; + + $info = get_remote_file('www.phpbb.com', '/updatecheck', '30x.txt', $errstr, $errno); + + if ($info === false) + { + trigger_error($errstr . adm_back_link($this->u_action)); + } + + $info = explode("\n", $info); + $latest_version = trim($info[0]); + + $announcement_url = trim($info[1]); + $update_archive_link = 'http://www.phpbb.com/files/releases/phpBB-' . $config['version'] . '_to_' . $latest_version . '.zip'; + $update_link = append_sid($phpbb_root_path . 'install/index.' . $phpEx, 'mode=update'); + + $up_to_date = (version_compare(strtolower($config['version']), strtolower($latest_version), '<')) ? false : true; + + $template->assign_vars(array( + 'S_UP_TO_DATE' => $up_to_date, + 'S_VERSION_CHECK' => true, + 'U_ACTION' => $this->u_action, + + 'LATEST_VERSION' => $latest_version, + 'CURRENT_VERSION' => $config['version'], + + 'UPDATE_INSTRUCTIONS' => sprintf($user->lang['UPDATE_INSTRUCTIONS'], $announcement_url, $update_archive_link, $update_link), + )); + } +} + +?> \ No newline at end of file diff --git a/phpBB/includes/acp/info/acp_update.php b/phpBB/includes/acp/info/acp_update.php new file mode 100644 index 0000000000..014d67ff2b --- /dev/null +++ b/phpBB/includes/acp/info/acp_update.php @@ -0,0 +1,37 @@ + 'acp_update', + 'title' => 'ACP_UPDATE', + 'version' => '1.0.0', + 'modes' => array( + 'version_check' => array('title' => 'ACP_VERSION_CHECK', 'auth' => 'acl_a_', 'cat' => array('ACP_AUTOMATION')), + ), + ); + } + + function install() + { + } + + function uninstall() + { + } +} + +?> \ No newline at end of file