Index: trunk/extensions/ApiSandbox/ext.apiSandbox.js |
— | — | @@ -22,11 +22,10 @@ |
23 | 23 | var actionCache = [], |
24 | 24 | propCache = [], |
25 | 25 | namespaces = [], |
26 | | - currentInfo = {}, |
27 | | - apiPhp = mw.config.get( 'wgServer' ) + mw.config.get( 'wgScriptPath' ) + '/api' + mw.config.get( 'wgScriptExtension' ); |
| 26 | + currentInfo = {}; |
28 | 27 | |
29 | 28 | // load namespaces |
30 | | - $.getJSON( apiPhp, |
| 29 | + $.getJSON( mw.util.wikiScript( 'api' ), |
31 | 30 | { format: 'json', action: 'query', meta: 'siteinfo', siprop: 'namespaces' }, |
32 | 31 | function( data ) { |
33 | 32 | if ( isset( data.query ) && isset( data.query.namespaces ) ) { |
— | — | @@ -50,7 +49,7 @@ |
51 | 50 | $query.change( updateBasics ); |
52 | 51 | |
53 | 52 | $submit.click( function() { |
54 | | - var url = apiPhp + '?action=' + $action.val(), |
| 53 | + var url = mw.util.wikiScript( 'api' ) + '?action=' + $action.val(), |
55 | 54 | info = currentInfo; // in case it changes later |
56 | 55 | if ( $action.val() == 'query' ) { |
57 | 56 | url += '&' + $query.val(); |
Index: trunk/extensions/wikihiero/modules/ext.wikihiero.Special.js |
— | — | @@ -23,7 +23,7 @@ |
24 | 24 | 'text': '<hiero>' + text + '</hiero>', |
25 | 25 | 'disablepp': '' |
26 | 26 | }; |
27 | | - $.getJSON( mw.config.get( 'wgScriptPath' ) + '/api' + mw.config.get( 'wgScriptExtension' ), |
| 27 | + $.getJSON( mw.util.wikiScript( 'api' ), |
28 | 28 | data, |
29 | 29 | function( data ) { |
30 | 30 | var html = '<table class="wikitable">' |