Change-Id: Ia3d843c79fa31fec59a04b92f4619458ae06de62
use Hooks;
use Interwiki;
use Language;
use Hooks;
use Interwiki;
use Language;
use MapCacheLRU;
use WANObjectCache;
use Wikimedia\Rdbms\Database;
use MapCacheLRU;
use WANObjectCache;
use Wikimedia\Rdbms\Database;
*/
private function getInterwikiCacheEntry( $prefix ) {
wfDebug( __METHOD__ . "( $prefix )\n" );
*/
private function getInterwikiCacheEntry( $prefix ) {
wfDebug( __METHOD__ . "( $prefix )\n" );
+
+ $wikiId = WikiMap::getWikiIdFromDomain( WikiMap::getCurrentWikiDomain() );
+
$value = false;
try {
// Resolve site name
if ( $this->interwikiScopes >= 3 && !$this->thisSite ) {
$value = false;
try {
// Resolve site name
if ( $this->interwikiScopes >= 3 && !$this->thisSite ) {
- $this->thisSite = $this->getCacheValue( '__sites:' . wfWikiID() );
+ $this->thisSite = $this->getCacheValue( '__sites:' . $wikiId );
if ( $this->thisSite == '' ) {
$this->thisSite = $this->fallbackSite;
}
}
if ( $this->thisSite == '' ) {
$this->thisSite = $this->fallbackSite;
}
}
- $value = $this->getCacheValue( wfWikiID() . ':' . $prefix );
+ $value = $this->getCacheValue( $wikiId . ':' . $prefix );
// Site level
if ( $value == '' && $this->interwikiScopes >= 3 ) {
$value = $this->getCacheValue( "_{$this->thisSite}:{$prefix}" );
// Site level
if ( $value == '' && $this->interwikiScopes >= 3 ) {
$value = $this->getCacheValue( "_{$this->thisSite}:{$prefix}" );
*/
private function getAllPrefixesCached( $local ) {
wfDebug( __METHOD__ . "()\n" );
*/
private function getAllPrefixesCached( $local ) {
wfDebug( __METHOD__ . "()\n" );
+
+ $wikiId = WikiMap::getWikiIdFromDomain( WikiMap::getCurrentWikiDomain() );
+
$data = [];
try {
/* Resolve site name */
if ( $this->interwikiScopes >= 3 && !$this->thisSite ) {
$data = [];
try {
/* Resolve site name */
if ( $this->interwikiScopes >= 3 && !$this->thisSite ) {
- $site = $this->getCacheValue( '__sites:' . wfWikiID() );
+ $site = $this->getCacheValue( '__sites:' . $wikiId );
if ( $site == '' ) {
$this->thisSite = $this->fallbackSite;
if ( $site == '' ) {
$this->thisSite = $this->fallbackSite;
if ( $this->interwikiScopes >= 3 ) {
$sources[] = '_' . $this->thisSite;
}
if ( $this->interwikiScopes >= 3 ) {
$sources[] = '_' . $this->thisSite;
}
- $sources[] = wfWikiID();
foreach ( $sources as $source ) {
$list = $this->getCacheValue( '__list:' . $source );
foreach ( $sources as $source ) {
$list = $this->getCacheValue( '__list:' . $source );