}
global $wgLocalFileRepo, $wgForeignFileRepos;
self::$instance = new RepoGroup( $wgLocalFileRepo, $wgForeignFileRepos );
+
return self::$instance;
}
# Check the cache
if ( empty( $options['ignoreRedirect'] )
&& empty( $options['private'] )
- && empty( $options['bypassCache'] ) )
- {
+ && empty( $options['bypassCache'] )
+ ) {
$time = isset( $options['time'] ) ? $options['time'] : '';
$dbkey = $title->getDBkey();
if ( isset( $this->cache[$dbkey][$time] ) ) {
wfDebug( __METHOD__ . ": got File:$dbkey from process cache\n" );
# Move it to the end of the list so that we can delete the LRU entry later
$this->pingCache( $dbkey );
+
# Return the entry
return $this->cache[$dbkey][$time];
}
$images = array_merge( $images, $repo->findFiles( $items ) );
}
+
return $images;
}
return $redir;
}
}
+
return false;
}
}
}
}
+
return $file;
}
$result = array_merge( $result, $repo->findBySha1( $hash ) );
}
usort( $result, 'File::compare' );
+
return $result;
}
foreach ( $result as $hash => $files ) {
usort( $result[$hash], 'File::compare' );
}
+
return $result;
}
return $repo;
}
}
+
return false;
}
return true;
}
}
+
return false;
}
*/
protected function newRepo( $info ) {
$class = $info['class'];
+
return new $class( $info );
}
if ( count( $bits ) != 3 ) {
throw new MWException( __METHOD__ . ": invalid mwrepo URL: $url" );
}
+
return $bits;
}
$repoName = 'local';
}
$repo = $this->getRepo( $repoName );
+
return $repo->getFileProps( $fileName );
} else {
return FSFile::getPropsFromPath( $fileName );