X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FLinker.php;h=39f43946d2fe7701b2d3c19352296705297f4ae5;hb=b7131c89e9ad0d69beb5373df794e3d63e3c5cb6;hp=ae50c66ff26c522a47a8979b9b97529411871b4c;hpb=eecc04472a0050093928bc48e0c789e99ce93e65;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Linker.php b/includes/Linker.php index ae50c66ff2..39f43946d2 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -555,7 +555,8 @@ class Linker { # Use manually specified thumbnail $manual_title = Title::makeTitleSafe( NS_FILE, $frameParams['manualthumb'] ); if ( $manual_title ) { - $manual_img = wfFindFile( $manual_title ); + $manual_img = MediaWikiServices::getInstance()->getRepoGroup() + ->findFile( $manual_title ); if ( $manual_img ) { $thumb = $manual_img->getUnscaledThumb( $handlerParams ); $manualthumb = true; @@ -693,7 +694,8 @@ class Linker { $label = $title->getPrefixedText(); } $encLabel = htmlspecialchars( $label ); - $currentExists = $time ? ( wfFindFile( $title ) != false ) : false; + $file = MediaWikiServices::getInstance()->getRepoGroup()->findFile( $title ); + $currentExists = $time ? ( $file != false ) : false; if ( ( $wgUploadMissingFileUrl || $wgUploadNavigationUrl || $wgEnableUploads ) && !$currentExists @@ -756,11 +758,13 @@ class Linker { * @since 1.16.3 * @param LinkTarget $title * @param string $html Pre-sanitized HTML - * @param string $time MW timestamp of file creation time + * @param string|false $time MW timestamp of file creation time * @return string HTML */ public static function makeMediaLinkObj( $title, $html = '', $time = false ) { - $img = wfFindFile( $title, [ 'time' => $time ] ); + $img = MediaWikiServices::getInstance()->getRepoGroup()->findFile( + $title, [ 'time' => $time ] + ); return self::makeMediaLinkFile( $title, $img, $html ); }