From: Kunal Mehta Date: Wed, 24 May 2017 03:41:48 +0000 (-0700) Subject: media: Avoid deprecated wfMemcKey() X-Git-Tag: 1.31.0-rc.0~3160 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=e37a7f257a9363077328fb1c9ac765fa4b983258;p=lhc%2Fweb%2Fwiklou.git media: Avoid deprecated wfMemcKey() And ObjectCache::getMainWANInstance() while we're at it. Change-Id: Ib22bd134c3faa56f8d8f111bb9ed99d826cbed40 --- diff --git a/includes/media/FormatMetadata.php b/includes/media/FormatMetadata.php index 2c541e0ff4..6b4ac8bf31 100644 --- a/includes/media/FormatMetadata.php +++ b/includes/media/FormatMetadata.php @@ -24,6 +24,7 @@ * @see http://exif.org/Exif2-2.PDF The Exif 2.2 specification * @file */ +use MediaWiki\MediaWikiServices; use Wikimedia\Timestamp\TimestampException; /** @@ -1584,14 +1585,14 @@ class FormatMetadata extends ContextSource { * @since 1.23 */ public function fetchExtendedMetadata( File $file ) { - $cache = ObjectCache::getMainWANInstance(); + $cache = MediaWikiServices::getInstance()->getMainWANObjectCache(); // If revision deleted, exit immediately if ( $file->isDeleted( File::DELETED_FILE ) ) { return []; } - $cacheKey = wfMemcKey( + $cacheKey = $cache->makeKey( 'getExtendedMetadata', $this->getLanguage()->getCode(), (int)$this->singleLang,