From 7ef448e97afeba8fd1e01eaef801fbc142362ca6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Gerg=C5=91=20Tisza?= Date: Tue, 2 Jan 2018 18:19:58 -0800 Subject: [PATCH] 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 --- includes/GlobalFunctions.php | 2 +- includes/filerepo/RepoGroup.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 ) ) { -- 2.20.1