Fix RepoGroup caching bug
authorGergő Tisza <tgr.huwiki@gmail.com>
Wed, 3 Jan 2018 02:19:58 +0000 (18:19 -0800)
committerGergő Tisza <tgr.huwiki@gmail.com>
Wed, 3 Jan 2018 02:26:46 +0000 (18:26 -0800)
'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
includes/filerepo/RepoGroup.php

index 523a0f9..310adeb 100644 (file)
@@ -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
  */
index 5e37d67..24d1ab2 100644 (file)
@@ -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 ) ) {