diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2007-06-30 15:04:49 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2007-06-30 15:04:49 +0000 |
commit | 5634fad4ae67fd6fa9251ff4aa50cc8553e826a4 (patch) | |
tree | d498a39d667e8afa273029c2210783af0eb8fbd0 /phpBB/includes/acp/acp_update.php | |
parent | b1b542f69b3fd2f5fad3f2b757bc9a1593628c8d (diff) | |
download | forums-5634fad4ae67fd6fa9251ff4aa50cc8553e826a4.tar forums-5634fad4ae67fd6fa9251ff4aa50cc8553e826a4.tar.gz forums-5634fad4ae67fd6fa9251ff4aa50cc8553e826a4.tar.bz2 forums-5634fad4ae67fd6fa9251ff4aa50cc8553e826a4.tar.xz forums-5634fad4ae67fd6fa9251ff4aa50cc8553e826a4.zip |
some fixes...
git-svn-id: file:///svn/phpbb/trunk@7813 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/acp/acp_update.php')
-rw-r--r-- | phpBB/includes/acp/acp_update.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/phpBB/includes/acp/acp_update.php b/phpBB/includes/acp/acp_update.php index 02d4c6bb3c..03f2db7d15 100644 --- a/phpBB/includes/acp/acp_update.php +++ b/phpBB/includes/acp/acp_update.php @@ -42,15 +42,28 @@ class acp_update $announcement_url = trim($info[1]); $update_link = append_sid($phpbb_root_path . 'install/index.' . $phpEx, 'mode=update'); + // Determine automatic update... + $sql = 'SELECT config_value + FROM ' . CONFIG_TABLE . " + WHERE config_name = 'version_update_from'"; + $result = $db->sql_query($sql); + $version_update_from = (string) $db->sql_fetchfield('config_value'); + $db->sql_freeresult($result); + + $current_version = (!empty($version_update_from)) ? $version_update_from : $config['version']; + + $up_to_date_automatic = (version_compare(str_replace('rc', 'RC', strtolower($current_version)), str_replace('rc', 'RC', strtolower($latest_version)), '<')) ? false : true; $up_to_date = (version_compare(str_replace('rc', 'RC', strtolower($config['version'])), str_replace('rc', 'RC', strtolower($latest_version)), '<')) ? false : true; $template->assign_vars(array( 'S_UP_TO_DATE' => $up_to_date, + 'S_UP_TO_DATE_AUTO' => $up_to_date_automatic, 'S_VERSION_CHECK' => true, 'U_ACTION' => $this->u_action, 'LATEST_VERSION' => $latest_version, 'CURRENT_VERSION' => $config['version'], + 'AUTO_VERSION' => $version_update_from, 'UPDATE_INSTRUCTIONS' => sprintf($user->lang['UPDATE_INSTRUCTIONS'], $announcement_url, $update_link), )); |