X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Ffilerepo%2FRepoGroup.php;h=bd32de04e1848d8bae8b8ebb4d684f3d92b1592d;hb=7c94ff498bcea6e7f449b3e94002a53fa8636389;hp=08a40ebf242eadf35635733b91f40c277455e5d8;hpb=e3bd13db0c285f312e31bb1b7271af4628cca80c;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/filerepo/RepoGroup.php b/includes/filerepo/RepoGroup.php index 08a40ebf24..bd32de04e1 100644 --- a/includes/filerepo/RepoGroup.php +++ b/includes/filerepo/RepoGroup.php @@ -135,17 +135,18 @@ class RepoGroup { } # Check the cache + $dbkey = $title->getDBkey(); if ( empty( $options['ignoreRedirect'] ) && empty( $options['private'] ) && empty( $options['bypassCache'] ) ) { $time = isset( $options['time'] ) ? $options['time'] : ''; - $dbkey = $title->getDBkey(); if ( $this->cache->has( $dbkey, $time, 60 ) ) { return $this->cache->get( $dbkey, $time ); } $useCache = true; } else { + $time = false; $useCache = false; } @@ -177,8 +178,8 @@ class RepoGroup { * @param array $inputItems An array of titles, or an array of findFile() options with * the "title" option giving the title. Example: * - * $findItem = array( 'title' => $title, 'private' => true ); - * $findBatch = array( $findItem ); + * $findItem = [ 'title' => $title, 'private' => true ]; + * $findBatch = [ $findItem ]; * $repo->findFiles( $findBatch ); * * No title should appear in $items twice, as the result use titles as keys