From: Gergő Tisza Date: Wed, 3 Jan 2018 02:19:58 +0000 (-0800) Subject: Fix RepoGroup caching bug X-Git-Tag: 1.31.0-rc.0~1007^2 X-Git-Url: http://git.cyclocoop.org/?a=commitdiff_plain;h=7ef448e97afeba8fd1e01eaef801fbc142362ca6;p=lhc%2Fweb%2Fwiklou.git Fix RepoGroup caching bug 'bypassCache' was renamed in I9f79e5942ced4ae13ba4de0b4c62908cc746e777 to 'latest' but the cache bypass code was not updated. Also fix an unrelated phpdoc error. Change-Id: I141b97300853c60092363a90af063c3fd4941d27 --- diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 523a0f93a6..310adeb0be 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -2910,7 +2910,7 @@ function wfGetLBFactory() { * Find a file. * Shortcut for RepoGroup::singleton()->findFile() * - * @param string $title String or Title object + * @param string|Title $title String or Title object * @param array $options Associative array of options (see RepoGroup::findFile) * @return File|bool File, or false if the file does not exist */ diff --git a/includes/filerepo/RepoGroup.php b/includes/filerepo/RepoGroup.php index 5e37d676ef..24d1ab2efe 100644 --- a/includes/filerepo/RepoGroup.php +++ b/includes/filerepo/RepoGroup.php @@ -138,7 +138,7 @@ class RepoGroup { $dbkey = $title->getDBkey(); if ( empty( $options['ignoreRedirect'] ) && empty( $options['private'] ) - && empty( $options['bypassCache'] ) + && empty( $options['latest'] ) ) { $time = isset( $options['time'] ) ? $options['time'] : ''; if ( $this->cache->has( $dbkey, $time, 60 ) ) {