From e6fca5c81641099e3462a889a5b98aedc1f53c03 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Mon, 29 Aug 2011 08:55:35 +0000 Subject: [PATCH] In WikiMap, pull wgCanonicalServer from $wgConf instead of wgServer for building URLs to foreign wikis. This means wgCanonicalServer is now expected to always be available in wgConf; document this in RELEASE-NOTES (-1.18 because this is for backporting). --- RELEASE-NOTES-1.18 | 2 ++ includes/WikiMap.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES-1.18 b/RELEASE-NOTES-1.18 index b1845f7fa2..4da63e2bbd 100644 --- a/RELEASE-NOTES-1.18 +++ b/RELEASE-NOTES-1.18 @@ -621,6 +621,8 @@ changes to languages because of Bugzilla reports. * Removed legacy wgAjaxWatch javascript global object, no longer in use. * (bug 28556) Upload support for MacBinary files has been removed (Used by Internet Explorer 5 for Mac OS 9) +* On wiki farm setups using $wgConf, 'wgCanonicalServer' is now expected to be + set for all wikis. This was already the case for 'wgServer'. == Compatibility == diff --git a/includes/WikiMap.php b/includes/WikiMap.php index 545e6a35eb..458718ee8b 100644 --- a/includes/WikiMap.php +++ b/includes/WikiMap.php @@ -18,7 +18,7 @@ class WikiMap { list( $major, $minor ) = $wgConf->siteFromDB( $wikiID ); if( isset( $major ) ) { - $server = $wgConf->get( 'wgServer', $wikiID, $major, + $server = $wgConf->get( 'wgCanonicalServer', $wikiID, $major, array( 'lang' => $minor, 'site' => $major ) ); $path = $wgConf->get( 'wgArticlePath', $wikiID, $major, array( 'lang' => $minor, 'site' => $major ) ); -- 2.20.1