Merge "maintenance: Script to rename titles for Unicode uppercasing changes"
[lhc/web/wiklou.git] / includes / api / ApiImageRotate.php
index 7045138..668bd0e 100644 (file)
@@ -1,4 +1,7 @@
 <?php
+
+use MediaWiki\MediaWikiServices;
+
 /**
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -56,7 +59,9 @@ class ApiImageRotate extends ApiBase {
                                }
                        }
 
-                       $file = wfFindFile( $title, [ 'latest' => true ] );
+                       $file = MediaWikiServices::getInstance()->getRepoGroup()->findFile(
+                               $title, [ 'latest' => true ]
+                       );
                        if ( !$file ) {
                                $r['result'] = 'Failure';
                                $r['errors'] = $this->getErrorFormatter()->arrayFromStatus(