X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Ffilebackend%2FFileBackendGroup.php;h=0b61979409253e6379607bec2e5cdb92e2b0f086;hp=87d9441c3b807ed65cf1a3143ad0dc61f1f97928;hb=c16af68fb62948dd8079a7fa49b7c12b9a748121;hpb=48df0714bbfe0d5cf3ced3de9081c02d583d78c3 diff --git a/includes/filebackend/FileBackendGroup.php b/includes/filebackend/FileBackendGroup.php index 87d9441c3b..0b61979409 100644 --- a/includes/filebackend/FileBackendGroup.php +++ b/includes/filebackend/FileBackendGroup.php @@ -19,9 +19,9 @@ * * @file * @ingroup FileBackend - * @author Aaron Schulz */ use \MediaWiki\Logger\LoggerFactory; +use MediaWiki\MediaWikiServices; /** * Class to handle file backend registration @@ -192,7 +192,7 @@ class FileBackendGroup { 'streamMimeFunc' => [ 'StreamFile', 'contentTypeFromPath' ], 'tmpDirectory' => wfTempDir(), 'statusWrapper' => [ 'Status', 'wrap' ], - 'wanCache' => ObjectCache::getMainWANInstance(), + 'wanCache' => MediaWikiServices::getInstance()->getMainWANObjectCache(), 'srvCache' => ObjectCache::getLocalServerInstance( 'hash' ), 'logger' => LoggerFactory::getInstance( 'FileOperation' ), 'profiler' => Profiler::instance() @@ -229,7 +229,7 @@ class FileBackendGroup { * @since 1.27 */ public function guessMimeInternal( $storagePath, $content, $fsPath ) { - $magic = MimeMagic::singleton(); + $magic = MediaWiki\MediaWikiServices::getInstance()->getMimeAnalyzer(); // Trust the extension of the storage path (caller must validate) $ext = FileBackend::extensionFromPath( $storagePath ); $type = $magic->guessTypesForExtension( $ext );