Merge "Parser: Add guessSectionNameFromStrippedText() and refactor"
[lhc/web/wiklou.git] / includes / filerepo / file / UnregisteredLocalFile.php
index b22f8cb..fde68bb 100644 (file)
@@ -151,7 +151,7 @@ class UnregisteredLocalFile extends File {
         */
        function getMimeType() {
                if ( !isset( $this->mime ) ) {
-                       $magic = MimeMagic::singleton();
+                       $magic = MediaWiki\MediaWikiServices::getInstance()->getMimeAnalyzer();
                        $this->mime = $magic->guessMimeType( $this->getLocalRefPath() );
                }
 
@@ -171,8 +171,8 @@ class UnregisteredLocalFile extends File {
        }
 
        /**
-       * @return int
-       */
+        * @return int
+        */
        function getBitDepth() {
                $gis = $this->getImageSize( $this->getLocalRefPath() );