r47471 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r47470‎ | r47471 | r47472 >
Date:22:52, 18 February 2009
Author:demon
Status:ok
Tags:
Comment:
Use $this->mInfo, not $info. Hopefully now we can actually get correct Mime info rather than guess-and-hope on the local install.
Modified paths:
  • /trunk/phase3/includes/filerepo/ForeignAPIFile.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/filerepo/ForeignAPIFile.php
@@ -87,11 +87,11 @@
8888 }
8989
9090 function getMimeType() {
91 - if( empty( $info['mime'] ) ) {
 91+ if( !isset( $this->mInfo['mime'] ) ) {
9292 $magic = MimeMagic::singleton();
93 - $info['mime'] = $magic->guessTypesForExtension( $this->getExtension() );
 93+ $this->mInfo['mime'] = $magic->guessTypesForExtension( $this->getExtension() );
9494 }
95 - return $info['mime'];
 95+ return $this->mInfo['mime'];
9696 }
9797
9898 /// @fixme May guess wrong on file types that can be eg audio or video

Status & tagging log