From: Chad Horohoe Date: Wed, 18 Feb 2009 22:52:33 +0000 (+0000) Subject: Use $this->mInfo, not $info. Hopefully now we can actually get correct Mime info... X-Git-Tag: 1.31.0-rc.0~42796 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/File:Does_not_exist.jpg?a=commitdiff_plain;h=e2c894deef83a9a9f3784e4d148368e60c403484;p=lhc%2Fweb%2Fwiklou.git Use $this->mInfo, not $info. Hopefully now we can actually get correct Mime info rather than guess-and-hope on the local install. --- diff --git a/includes/filerepo/ForeignAPIFile.php b/includes/filerepo/ForeignAPIFile.php index 965981f179..bcea32c817 100644 --- a/includes/filerepo/ForeignAPIFile.php +++ b/includes/filerepo/ForeignAPIFile.php @@ -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