Make wfScript()/mw.util.wikiScript() respect $wgScript/$wgLoadScript
authorCatrope <roan.kattouw@gmail.com>
Tue, 21 Aug 2012 19:38:00 +0000 (12:38 -0700)
committerCatrope <roan.kattouw@gmail.com>
Tue, 21 Aug 2012 21:27:04 +0000 (14:27 -0700)
commit8b1b82f396a0ed25e28ed474378e9c1d6c6dbe6b
tree0da13682003baf70174bec22e46791060ff2d46b
parent3e008153a26400b5cf55f03337ffdd759d28b645
Make wfScript()/mw.util.wikiScript() respect $wgScript/$wgLoadScript

mw.util.wikiScript() and mw.util.wikiScript( 'index' ) now return the
value of $wgScript rather than building the path to index.php manually;
the latter is incorrect if $wgScript is customized. Similarly,
mw.util.wikiScript( 'load' ) now uses $wgLoadScript.

Same for wfScript(), wfScript( 'index' ) and wfScript( 'load' )

The qunit tests already had a test case for wgScript, but wgScript was
set in a way that didn't trigger the bug. Changed it to use customized
wgScript and wgLoadScript values and added test cases for 'index' and
'load'

This fixes bug 39103 (wfScript/mw.util.wikiScript do not respect custom
$wgScript/$wgLoadScript) as well as bug 39102 ("Entry points" on
Special:Version do not respect custom $wgScript/$wgLoadScript)

Change-Id: I5c9e82849e314dc7a87f8ae91150cc412b4011cf
includes/GlobalFunctions.php
resources/mediawiki/mediawiki.util.js
tests/qunit/suites/resources/mediawiki/mediawiki.util.test.js