X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fgallery%2FTraditionalImageGallery.php;h=fadd5878ba551d6dc409dc2789c685963d6a5312;hb=cc41773f61c23b922fe4cfc513b105ec4d32eeec;hp=479ca5d9bd4d365d2751f82a9f76ddb523a5b9bf;hpb=03608896716851972cc22d28d432d233be10edba;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/gallery/TraditionalImageGallery.php b/includes/gallery/TraditionalImageGallery.php index 479ca5d9bd..fadd5878ba 100644 --- a/includes/gallery/TraditionalImageGallery.php +++ b/includes/gallery/TraditionalImageGallery.php @@ -1,4 +1,7 @@ getRenderLang(); # Output each image... foreach ( $this->mImages as $pair ) { + // "text" means "caption" here /** @var Title $nt */ - $nt = $pair[0]; - $text = $pair[1]; # "text" means "caption" here - $alt = $pair[2]; - $link = $pair[3]; + list( $nt, $text, $alt, $link ) = $pair; $descQuery = false; if ( $nt->getNamespace() === NS_FILE ) { @@ -89,7 +90,7 @@ class TraditionalImageGallery extends ImageGalleryBase { # Fetch and register the file (file title may be different via hooks) list( $img, $nt ) = $this->mParser->fetchFileAndTitle( $nt, $options ); } else { - $img = wfFindFile( $nt ); + $img = MediaWikiServices::getInstance()->getRepoGroup()->findFile( $nt ); } } else { $img = false; @@ -110,8 +111,8 @@ class TraditionalImageGallery extends ImageGalleryBase { if ( $this->mParser instanceof Parser ) { $this->mParser->addTrackingCategory( 'broken-file-category' ); } - } elseif ( $this->mHideBadImages - && wfIsBadImage( $nt->getDBkey(), $this->getContextTitle() ) + } elseif ( $this->mHideBadImages && MediaWikiServices::getInstance()->getBadFileLookup() + ->isBadFile( $nt->getDBkey(), $this->getContextTitle() ) ) { # The image is blacklisted, just show it as a text link. $thumbhtml = "\n\t\t\t" . '
+ // getContentLanguage()->getNsText( MediaWikiServices::getInstance()-> + // getNamespaceInfo()->getUser() ) . ":{$ut}" ); // $ul = Linker::link( $linkTarget, $ut ); $meta = [];