diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2014-03-14 14:04:30 +0100 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2014-03-14 14:04:30 +0100 |
commit | 0aa23d203ef8760bd4f536b4eeaa6e9022c68eee (patch) | |
tree | 725cca559d663efe32e9864514ff75b787d1cd57 /phpBB/includes/functions_admin.php | |
parent | c743e28b94e2764b23c6e7da0e8e8d3452aec71e (diff) | |
parent | 60d2c1f4006894f2bb4fa310372734d02565e9ca (diff) | |
download | forums-0aa23d203ef8760bd4f536b4eeaa6e9022c68eee.tar forums-0aa23d203ef8760bd4f536b4eeaa6e9022c68eee.tar.gz forums-0aa23d203ef8760bd4f536b4eeaa6e9022c68eee.tar.bz2 forums-0aa23d203ef8760bd4f536b4eeaa6e9022c68eee.tar.xz forums-0aa23d203ef8760bd4f536b4eeaa6e9022c68eee.zip |
Merge remote-tracking branch 'EXreaction/ticket/9871-2' into develop
* EXreaction/ticket/9871-2:
[ticket/9871] Can set current version to use instead of the phpBB version
[ticket/9871] Fix indentation on comment
[ticket/9871] Fix test name
[ticket/9871] Split fast and slow version tests
[ticket/9871] Option to force the stability when checking for updates
[ticket/9871] Allow setting the host/file to load for the version class
[ticket/9871] Restore get_remote_file_test
[ticket/9871] Fix tests
[ticket/9871] Typehint and comment on var types
[ticket/9871] Mark test as slow
[ticket/9871] Restore phpbb_version_compare
[ticket/9871] Restore get_remote_file
[ticket/9871] Use $request->variable instead of request_var
[ticket/9871] Update version check file to use json format
Diffstat (limited to 'phpBB/includes/functions_admin.php')
-rw-r--r-- | phpBB/includes/functions_admin.php | 41 |
1 files changed, 1 insertions, 40 deletions
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php index 0e28b48d8a..b31b268db7 100644 --- a/phpBB/includes/functions_admin.php +++ b/phpBB/includes/functions_admin.php @@ -3041,7 +3041,7 @@ function get_remote_file($host, $directory, $filename, &$errstr, &$errno, $port return $file_info; } -/** +/* * Tidy Warnings * Remove all warnings which have now expired from the database * The duration of a warning can be defined by the administrator @@ -3151,45 +3151,6 @@ function add_permission_language() } /** - * Obtains the latest version information - * - * @param bool $force_update Ignores cached data. Defaults to false. - * @param bool $warn_fail Trigger a warning if obtaining the latest version information fails. Defaults to false. - * @param int $ttl Cache version information for $ttl seconds. Defaults to 86400 (24 hours). - * - * @return string | false Version info on success, false on failure. - */ -function obtain_latest_version_info($force_update = false, $warn_fail = false, $ttl = 86400) -{ - global $cache; - - $info = $cache->get('versioncheck'); - - if ($info === false || $force_update) - { - $errstr = ''; - $errno = 0; - - $info = get_remote_file('version.phpbb.com', '/phpbb', - ((defined('PHPBB_QA')) ? '30x_qa.txt' : '30x.txt'), $errstr, $errno); - - if (empty($info)) - { - $cache->destroy('versioncheck'); - if ($warn_fail) - { - trigger_error($errstr, E_USER_WARNING); - } - return false; - } - - $cache->put('versioncheck', $info, $ttl); - } - - return $info; -} - -/** * Enables a particular flag in a bitfield column of a given table. * * @param string $table_name The table to update |