Index: trunk/extensions/UploadWizard/test/jasmine/spec/mw.Api.edit.spec.js |
— | — | @@ -9,20 +9,20 @@ |
10 | 10 | dataType: 'json' |
11 | 11 | }; |
12 | 12 | |
13 | | - describe( "mw.Api", function() { |
| 13 | + describe( 'mw.Api', function() { |
14 | 14 | |
15 | 15 | var MAX_DELAY = 1000; // ms |
16 | 16 | |
17 | 17 | // typical globals made available |
18 | 18 | // TODO this only works for me (NeilK) |
19 | | - var wgScriptPath = '/w'; |
| 19 | + mw.config.set( 'wgScriptPath', '/w' ); |
20 | 20 | |
21 | 21 | var pageUri = new mw.Uri( window.location ); |
22 | 22 | |
23 | 23 | var apiUrl = new mw.Uri( { |
24 | 24 | protocol: pageUri.protocol, |
25 | 25 | host: pageUri.host, |
26 | | - path: wgScriptPath + '/api.php' |
| 26 | + path: mw.config.get( 'wgScriptPath' ) + '/api.php' |
27 | 27 | } ); |
28 | 28 | |
29 | 29 | describe( "edit token", function() { |
Index: trunk/extensions/UploadWizard/resources/mw.UploadWizard.js |
— | — | @@ -51,7 +51,7 @@ |
52 | 52 | |
53 | 53 | // load list of languages so we'll have it ready when description interfaces are created |
54 | 54 | // XXX replace this code once any of the following bugs are fixed: 25845, 27535, 27561 |
55 | | - var languageHandlerUrl = wgServer + wgScript + '?' + $.param( { 'title': 'MediaWiki:LanguageHandler.js', 'action': 'raw', 'ctype': 'text/javascript' } ); |
| 55 | + var languageHandlerUrl = mw.util.wikiScript() + '?' + $.param( { 'title': 'MediaWiki:LanguageHandler.js', 'action': 'raw', 'ctype': 'text/javascript' } ); |
56 | 56 | mw.loader.load( languageHandlerUrl ); |
57 | 57 | |
58 | 58 | // remove first spinner |
Index: trunk/extensions/UploadWizard/UploadWizardPage.js |
— | — | @@ -7,9 +7,9 @@ |
8 | 8 | */ |
9 | 9 | |
10 | 10 | // Create UploadWizard |
11 | | -( function( mw, $, undefined ) { |
| 11 | +( function ( $, mw, undefined ) { |
12 | 12 | |
13 | | -mw.UploadWizardPage = function() { |
| 13 | +mw.UploadWizardPage = function () { |
14 | 14 | |
15 | 15 | var config = mw.config.get( 'UploadWizardConfig' ); |
16 | 16 | if ( !config.debug ) { |
— | — | @@ -21,9 +21,9 @@ |
22 | 22 | |
23 | 23 | }; |
24 | 24 | |
25 | | -jQuery( document ).ready( function() { |
| 25 | +$( document ).ready( function () { |
26 | 26 | // add "magic" to Language template parser for keywords |
27 | | - var options = { magic: { 'SITENAME' : wgSiteName } }; |
| 27 | + var options = { magic: { 'SITENAME' : mw.config.get( 'wgSiteName' ) } }; |
28 | 28 | |
29 | 29 | // these functions may exist already, but we want them to also know about our magic |
30 | 30 | // (the interface for this needs to change; add magic on the fly?) |
— | — | @@ -34,4 +34,4 @@ |
35 | 35 | mw.UploadWizardPage(); |
36 | 36 | } ); |
37 | 37 | |
38 | | -} )( window.mediaWiki, jQuery ); |
| 38 | +} )( jQuery, mediaWiki ); |