From: addshore Date: Tue, 21 Feb 2017 16:53:52 +0000 (+0000) Subject: Use getMainObjectStash from MediawikiServices in static UploadBase methods X-Git-Tag: 1.31.0-rc.0~3892^2 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmes_infos.php?a=commitdiff_plain;h=d2bf8056b7da9a1c97d864ddcf98e09a3eaf20b6;p=lhc%2Fweb%2Fwiklou.git Use getMainObjectStash from MediawikiServices in static UploadBase methods Change-Id: Ic547efe231c1457b2028301b9db055d3d4e6abfe --- diff --git a/includes/upload/UploadBase.php b/includes/upload/UploadBase.php index bac7129c69..733c4fff05 100644 --- a/includes/upload/UploadBase.php +++ b/includes/upload/UploadBase.php @@ -20,6 +20,7 @@ * @file * @ingroup Upload */ +use MediaWiki\MediaWikiServices; /** * @defgroup Upload Upload related @@ -2083,7 +2084,7 @@ abstract class UploadBase { public static function getSessionStatus( User $user, $statusKey ) { $key = wfMemcKey( 'uploadstatus', $user->getId() ?: md5( $user->getName() ), $statusKey ); - return ObjectCache::getMainStashInstance()->get( $key ); + return MediaWikiServices::getInstance()->getMainObjectStash()->get( $key ); } /** @@ -2099,7 +2100,7 @@ abstract class UploadBase { public static function setSessionStatus( User $user, $statusKey, $value ) { $key = wfMemcKey( 'uploadstatus', $user->getId() ?: md5( $user->getName() ), $statusKey ); - $cache = ObjectCache::getMainStashInstance(); + $cache = MediaWikiServices::getInstance()->getMainObjectStash(); if ( $value === false ) { $cache->delete( $key ); } else {