(bug 27916) Don't prefix wgServer in mw.util.wikiGetlink
authorKrinkle <krinkle@users.mediawiki.org>
Sun, 1 May 2011 19:20:31 +0000 (19:20 +0000)
committerKrinkle <krinkle@users.mediawiki.org>
Sun, 1 May 2011 19:20:31 +0000 (19:20 +0000)
commit970a7ac8a8cd780c779a9c45f6993dd7dd6ec724
tree22d04e3f711fb92179fd98f5e7d776753745e43b
parentf56afa36a65bbe9963be9e4000c9a4a82be97e45
(bug 27916) Don't prefix wgServer in mw.util.wikiGetlink

The check is not needed, if wgArticlePath is undefined there's probably a much bigger issue.

The wgServer doesn't need to be prefixed to the link (if someone really needs it (ie. external tools using the script and somehow defining wgServer in mw.config) they can surely prefix wgServer themselfs.

In most if not all cases this is used to create anchor tags, which are interprated by browsers relatively to the current window location and in some browsers it even auto-prefixes the current environment when setting the href/src attribute.

I did a grep search for "wikiGetlink" in /trunk (including ./extensions), there was one usage that assumed the wgServer prefix. Turned out that was actually a workaround untill this bug was fixed. I remove that workaround ( in mw.util.isMainPage).
languages/Language.php
resources/mediawiki.util/mediawiki.util.js