From d2bf8056b7da9a1c97d864ddcf98e09a3eaf20b6 Mon Sep 17 00:00:00 2001 From: addshore Date: Tue, 21 Feb 2017 16:53:52 +0000 Subject: [PATCH] Use getMainObjectStash from MediawikiServices in static UploadBase methods Change-Id: Ic547efe231c1457b2028301b9db055d3d4e6abfe --- includes/upload/UploadBase.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 { -- 2.20.1