Replace some uses of deprecated wfFindFile() and wfLocalFile()
[lhc/web/wiklou.git] / includes / gallery / TraditionalImageGallery.php
index 4d5222c..d25d9aa 100644 (file)
@@ -1,4 +1,7 @@
 <?php
+
+use MediaWiki\MediaWikiServices;
+
 /**
  * Image gallery.
  *
@@ -87,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;