Commit graph

12 commits

Author SHA1 Message Date
Aaron Schulz
a005f1de98 Clean up wiki ID and DB domain ID handling
Bug: T174017
Change-Id: I42299a393c6691d39817db1d83a176a17df2474b
2017-09-30 10:25:03 +00:00
Aaron Schulz
15cb57b3b5 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
2017-08-23 15:37:35 -07:00
Brad Jorsch
010410265a Improve WikiMap::getWikiReferenceFromWgConf()
If we don't have a valid canonical server and path to pass, there's no
point in returning a WikiReference that will fail in strange and unusal
ways.

This also documents that $wgServer/$wgCanonicalServer and $wgArticlePath
are required in SiteConfiguration.

Change-Id: Ib08011e9f1d0817a5d1bb165aba6b424785eaa6a
2016-07-06 14:20:07 -04:00
Kunal Mehta
6e9b4f0e9c Convert all array() syntax to []
Per wikitech-l consensus:
 https://lists.wikimedia.org/pipermail/wikitech-l/2016-February/084821.html

Notes:
* Disabled CallTimePassByReference due to false positives (T127163)

Change-Id: I2c8ce713ce6600a0bb7bf67537c87044c7a45c4b
2016-02-17 01:33:00 -08:00
Marius Hoch
3d85fde609 Make WikiMap fall back to sites if a site couldn't be found using $wgConf
The mapping is not very good, but should be good enough, given
that only the URL parts are really being used.

Bug: T114107
Change-Id: I8186140aed5620cf7b4ba84aa4c9492c61f406d0
2015-10-07 14:59:31 +02:00
Amir E. Aharoni
93a673d24a Fix spelling of "fragment" in test descriptions
Change-Id: I97ca75b9c587443e195b1c162dcfee7880a5e226
2015-10-03 12:30:59 +00:00
Marius Hoch
725a203bc1 Remove unused minor and major in WikiReference
Given that the class is not constructed anywhere outside
of core the constructor can be altered without having to
worry about b/c.

Change-Id: Ie49c43a1724f05cb95a296dc0fad0f1c587d80ef
2015-10-01 19:12:07 +02:00
Amir E. Aharoni
f9d0c98e16 Make lines short to pass phpcs in 2 files under tests/phpunit/includes/
Bug: T102614
Change-Id: I21a7cbc40a3015c3d6cbea1b9d7df58a358beb6a
2015-09-30 16:17:35 +00:00
Ricordisamoa
4f72efe8d8 Remove excess newlines at the end of files
Many of them added with commit 776c865077

Change-Id: I481b15c45ead1f5f482e120cb40ea8f3297543cf
2015-09-27 00:02:05 +02:00
Reedy
8e8368ca65 Re-enable MediaWiki.WhiteSpace.SpaceyParenthesis.SingleSpaceBeforeCloseParenthesis
Change-Id: I8482f5dd9d79e4946e862b0ac03bd027d62e8646
2015-09-26 17:38:35 +01:00
daniel
5852451177 Add support for fragments to WikiMap
WikiMap::makeForeignUrl should support fragement IDs in the
generated URL.

Change-Id: I612d5f465822b56356a78b3e72fb441a888668f1
2015-09-11 16:25:53 +02:00
daniel
3cecad00c9 Add tests for WikiMap and WikiReference
Change-Id: Ie218296fc7c1ceba588fadef076d66be865b1905
2015-09-11 16:21:16 +02:00