From: Timo Tijhof Date: Tue, 11 Apr 2017 02:34:38 +0000 (-0700) Subject: interwiki: Remove inappropiate use of wfMemcKey() X-Git-Tag: 1.31.0-rc.0~3538^2 X-Git-Url: http://git.cyclocoop.org/%22.htmlspecialchars%28%24url_syndic%29.%22?a=commitdiff_plain;h=6375900e966122a6e8e6c0024934a65e76110097;p=lhc%2Fweb%2Fwiklou.git interwiki: Remove inappropiate use of wfMemcKey() This is used for lookup in a CDB file or PHP static array. In neither case is the key created by wfMemcKey() or any other implementation of BagOStuff::makeKey(). This is already broken if: * An interwiki prefix were to contain characters not supported by Memcached. * An interwiki prefix and wikiid together are too long for Memcached. * If the site has wgCachePrefix configured, which overrides the wfWikiID() namespace makeKey() normally uses. dumpInterwiki.php does not use wfMemcKey() either (and should not). This was simply here as leftover from many rewrites ago, its only purpose is to create wikiid + prefix joined by colon. Ref T148958. Change-Id: I45682133ed593fbb0d66af5a67751f77f15a4a14 --- diff --git a/includes/interwiki/ClassicInterwikiLookup.php b/includes/interwiki/ClassicInterwikiLookup.php index 883b5fac46..f19e3dbcfb 100644 --- a/includes/interwiki/ClassicInterwikiLookup.php +++ b/includes/interwiki/ClassicInterwikiLookup.php @@ -221,7 +221,7 @@ class ClassicInterwikiLookup implements InterwikiLookup { } } - $value = $this->getCacheValue( wfMemcKey( $prefix ) ); + $value = $this->getCacheValue( wfWikiID() . ':' . $prefix ); // Site level if ( $value == '' && $this->interwikiScopes >= 3 ) { $value = $this->getCacheValue( "_{$this->thisSite}:{$prefix}" );