62// Handle redirects; callers almost always hit RepoGroup::findFile() anyway, 63// so just use that method because it has a fast process cache. 64 $file = $this->repoGroup->findFile( $name );
65// XXX If we don't find the file we also don't replace spaces by underscores or otherwise 66// validate or normalize the title, is this right? 68 $name = $file->getTitle()->getDBkey();
71// Run the extension hook 73if ( !$this->hookRunner->onBadImage( $name, $bad ) ) {
77if ( $this->badFiles ===
null ) {
78 $list = ( $this->listCallback )();
79 $key = $this->cache->makeKey(
'bad-image-list', sha1( $list ) );
80 $this->badFiles = $this->cache->getWithSetCallback(
83function () use ( $list ) {
84return $this->buildBadFilesList( $list );
89return isset( $this->badFiles[$name] ) && ( !$contextTitle ||
90 !isset( $this->badFiles[$name][$contextTitle->getNamespace()][$contextTitle->getDBkey()] ) );