User "Helder.wiki" posted a comment on MediaWiki.r87208. Full URL: https://secure.wikimedia.org/wikipedia/mediawiki/wiki/Special:Code/MediaWiki/87208#c16992 Commit summary:
(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). Comment: After this change, the [http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/resources/mediawiki.util/mediawiki.util.js?annotate=88276#l193 function documentation] is misleading: <pre> /** * Get the full URL to a page name * * @param str Page name to link to * @return Full URL for page with name of 'str' or false on error */ </pre> The return value ins't a full URL anymore. Maybe the function should be renamed to make this clear, e.g. wikiGetRelativelink or something like that... _______________________________________________ MediaWiki-CodeReview mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview
