Avoid preemptive DB replication waits for farm cross-wiki redirects
authorAaron Schulz <aschulz@wikimedia.org>
Tue, 22 Aug 2017 21:36:15 +0000 (14:36 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Wed, 23 Aug 2017 22:37:35 +0000 (15:37 -0700)
commit15cb57b3b5c5b665f4602baccfc320701b3ef6aa
treed6dc7e174efa27f72eb3f4d6fe281da214cbafe7
parent1b0c9f6098c31d6bf16a00d37a8aa5cd493270e1
Avoid preemptive DB replication waits for farm cross-wiki redirects

This previously only worked if $wgLocalVirtualHosts was set, which
was too specific to check and not used by WMF. Use the more generic
WikiMap class.

Two methods have been added there to do the work of enumerating
canonical wiki farm URLs and checking them against a given URL.

Bug: T172357
Change-Id: Id2415bab5d7f5a08b9f536858c32d329138384a2
includes/DefaultSettings.php
includes/MediaWiki.php
includes/WikiMap.php
tests/phpunit/includes/WikiMapTest.php