Allow local interwiki links with an empty title part
authorThis, that and the other <at.light@live.com.au>
Mon, 21 Apr 2014 03:20:24 +0000 (13:20 +1000)
committerThis, that and the other <at.light@live.com.au>
Mon, 21 Apr 2014 03:20:24 +0000 (13:20 +1000)
commitc815f959d6b27b7abad72256af9ac43864692dc2
treef9bc1eacec458c779719ff106c887048a6ba1db0
parent1c5d667f38b5eadce2778d56d9058684d612908f
Allow local interwiki links with an empty title part

For example, [[en:]] on enwiki. These links were for some reason considered
invalid. However, to support use-cases such as cross-wiki transclusion and
the importing of templates across wikis, this type of link should be
allowed.

I can't see that this would break anything. If anything, it will "un-break"
some links.

Should MediaWikiTitleCodec depend on Title::newMainPage? Almost certainly
not, but I note that splitTitleString is earmarked for demolition, so I
expect that the confusing dependency-web will be cleaned up in the future.
I also note that MediaWikiTitleCode already uses various static methods of
the Title class.

Bug: 64167
Change-Id: I27495aa62e6059c7725387135ae0358d7e6fb35b
includes/title/MediaWikiTitleCodec.php
tests/phpunit/includes/TitleTest.php