Use $this->mInfo, not $info. Hopefully now we can actually get correct Mime info...
authorChad Horohoe <demon@users.mediawiki.org>
Wed, 18 Feb 2009 22:52:33 +0000 (22:52 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Wed, 18 Feb 2009 22:52:33 +0000 (22:52 +0000)
includes/filerepo/ForeignAPIFile.php

index 965981f..bcea32c 100644 (file)
@@ -87,11 +87,11 @@ class ForeignAPIFile extends File {
        }
        
        function getMimeType() {
-               if( empty( $info['mime'] ) ) {
+               if( !isset( $this->mInfo['mime'] ) ) {
                        $magic = MimeMagic::singleton();
-                       $info['mime'] = $magic->guessTypesForExtension( $this->getExtension() );
+                       $this->mInfo['mime'] = $magic->guessTypesForExtension( $this->getExtension() );
                }
-               return $info['mime'];
+               return $this->mInfo['mime'];
        }
        
        /// @fixme May guess wrong on file types that can be eg audio or video