From 82584edd0e1b61460043b2e65d1089ef6ff784a5 Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Wed, 10 Jan 2018 19:50:06 +0530 Subject: [PATCH] Don't use deprecated wfMemcKey() or wfGlobalCacheKey() Change-Id: I7fe5a45226a92ef19c25790a800a7ae7b7a3a57a --- common/ApiScribuntoConsole.php | 2 +- engines/LuaCommon/LuaCommon.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/ApiScribuntoConsole.php b/common/ApiScribuntoConsole.php index 28a86c62..22f29668 100644 --- a/common/ApiScribuntoConsole.php +++ b/common/ApiScribuntoConsole.php @@ -22,8 +22,8 @@ class ApiScribuntoConsole extends ApiBase { $sessionId = mt_rand( 0, 0x7fffffff ); } - $sessionKey = wfMemcKey( 'scribunto-console', $this->getUser()->getId(), $sessionId ); $cache = ObjectCache::getInstance( CACHE_ANYTHING ); + $sessionKey = $cache->makeKey( 'scribunto-console', $this->getUser()->getId(), $sessionId ); $session = null; $sessionIsNew = false; if ( $params['session'] ) { diff --git a/engines/LuaCommon/LuaCommon.php b/engines/LuaCommon/LuaCommon.php index 423c217b..d6d47cc1 100644 --- a/engines/LuaCommon/LuaCommon.php +++ b/engines/LuaCommon/LuaCommon.php @@ -345,7 +345,7 @@ abstract class Scribunto_LuaEngine extends ScribuntoEngineBase { throw new MWException( 'Lua file does not exist: ' . $fileName ); } - $cacheKey = wfGlobalCacheKey( __CLASS__, $fileName ); + $cacheKey = $cache->makeGlobalKey( __CLASS__, $fileName ); $fileData = $cache->get( $cacheKey ); $code = false;