Addshore has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/338995 )
Change subject: Use getMainObjectStash from MediawikiServices in static
UploadBase methods
......................................................................
Use getMainObjectStash from MediawikiServices in static UploadBase methods
Change-Id: Ic547efe231c1457b2028301b9db055d3d4e6abfe
---
M includes/upload/UploadBase.php
1 file changed, 3 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/95/338995/1
diff --git a/includes/upload/UploadBase.php b/includes/upload/UploadBase.php
index 79166ef..fd0ab56 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 @@
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 @@
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 {
--
To view, visit https://gerrit.wikimedia.org/r/338995
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic547efe231c1457b2028301b9db055d3d4e6abfe
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Addshore <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits