dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Replace MimeMagic::singleton() calls
[lhc/web/wiklou.git]
/
includes
/
filerepo
/
file
/
ForeignAPIFile.php
diff --git
a/includes/filerepo/file/ForeignAPIFile.php
b/includes/filerepo/file/ForeignAPIFile.php
index
43b6855
..
16c154f
100644
(file)
--- a/
includes/filerepo/file/ForeignAPIFile.php
+++ b/
includes/filerepo/file/ForeignAPIFile.php
@@
-286,7
+286,7
@@
class ForeignAPIFile extends File {
*/
function getMimeType() {
if ( !isset( $this->mInfo['mime'] ) ) {
*/
function getMimeType() {
if ( !isset( $this->mInfo['mime'] ) ) {
- $magic = M
imeMagic::singleton
();
+ $magic = M
ediaWiki\MediaWikiServices::getInstance()->getMimeAnalyzer
();
$this->mInfo['mime'] = $magic->guessTypesForExtension( $this->getExtension() );
}
$this->mInfo['mime'] = $magic->guessTypesForExtension( $this->getExtension() );
}
@@
-300,7
+300,7
@@
class ForeignAPIFile extends File {
if ( isset( $this->mInfo['mediatype'] ) ) {
return $this->mInfo['mediatype'];
}
if ( isset( $this->mInfo['mediatype'] ) ) {
return $this->mInfo['mediatype'];
}
- $magic = M
imeMagic::singleton
();
+ $magic = M
ediaWiki\MediaWikiServices::getInstance()->getMimeAnalyzer
();
return $magic->getMediaType( null, $this->getMimeType() );
}
return $magic->getMediaType( null, $this->getMimeType() );
}