Merge "Rewrite pref cleanup script"
[lhc/web/wiklou.git] / includes / filerepo / file / File.php
index 827f4ca..cfbd062 100644 (file)
@@ -148,7 +148,7 @@ abstract class File implements IDBAccessObject {
        protected $isSafeFile;
 
        /** @var string Required Repository class type */
-       protected $repoClass = 'FileRepo';
+       protected $repoClass = FileRepo::class;
 
        /** @var array Cache of tmp filepaths pointing to generated bucket thumbnails, keyed by width */
        protected $tmpBucketedThumbCache = [];
@@ -250,7 +250,7 @@ abstract class File implements IDBAccessObject {
                $oldMime = $old->getMimeType();
                $n = strrpos( $new, '.' );
                $newExt = self::normalizeExtension( $n ? substr( $new, $n + 1 ) : '' );
-               $mimeMagic = MimeMagic::singleton();
+               $mimeMagic = MediaWiki\MediaWikiServices::getInstance()->getMimeAnalyzer();
 
                return $mimeMagic->isMatchingExtension( $newExt, $oldMime );
        }