Index: trunk/extensions/UploadWizard/resources/mw.DestinationChecker.js |
— | — | @@ -146,7 +146,6 @@ |
147 | 147 | |
148 | 148 | if ( data.query.pages[-1] ) { |
149 | 149 | // No conflict found; this file name is unique |
150 | | - mw.log("mw.DestinationChecker::checkUnique> No pages in checkUnique result"); |
151 | 150 | result = { isUnique: true }; |
152 | 151 | |
153 | 152 | } else { |
— | — | @@ -157,8 +156,6 @@ |
158 | 157 | } |
159 | 158 | |
160 | 159 | // Conflict found, this filename is NOT unique |
161 | | - mw.log( "mw.DestinationChecker::checkUnique> conflict! " ); |
162 | | - |
163 | 160 | var ntitle; |
164 | 161 | if ( data.query.normalized ) { |
165 | 162 | ntitle = data.query.normalized[0].to; |
Index: trunk/extensions/UploadWizard/resources/mw.Api.edit.js |
— | — | @@ -1,7 +1,5 @@ |
2 | 2 | // library to assist with edits |
3 | 3 | |
4 | | -// dependencies: [ mw.Api, jQuery ] |
5 | | - |
6 | 4 | ( function( mw, $ ) { |
7 | 5 | |
8 | 6 | // cached token so we don't have to keep fetching new ones for every single post |
— | — | @@ -19,36 +17,27 @@ |
20 | 18 | */ |
21 | 19 | postWithEditToken: function( params, ok, err ) { |
22 | 20 | var api = this; |
23 | | - var _method = 'mw.api.edit::postWithEditToken> '; |
24 | | - mw.log( 'post with edit token' ); |
25 | 21 | if ( cachedToken === null ) { |
26 | | - mw.log( _method + 'no cached token' ); |
27 | 22 | // We don't have a valid cached token, so get a fresh one and try posting. |
28 | 23 | // We do not trap any 'badtoken' or 'notoken' errors, because we don't want |
29 | 24 | // an infinite loop. If this fresh token is bad, something else is very wrong. |
30 | 25 | var useTokenToPost = function( token ) { |
31 | | - mw.log( _method + 'posting with token = ' + token ); |
32 | 26 | params.token = token; |
33 | 27 | this.post( params, ok, err ); |
34 | 28 | }; |
35 | | - mw.log( _method + 'getting edit token' ); |
36 | 29 | api.getEditToken( useTokenToPost, err ); |
37 | 30 | } else { |
38 | 31 | // We do have a token, but it might be expired. So if it is 'bad' then |
39 | 32 | // start over with a new token. |
40 | 33 | params.token = cachedToken; |
41 | | - mw.log( _method + 'we do have a token = ' + params.token ); |
42 | 34 | var getTokenIfBad = function( code, result ) { |
43 | | - mw.log( _method + "error with posting with token!" ); |
44 | 35 | if ( code === 'badtoken' ) { |
45 | | - mw.log( _method + "bad token; try again" ); |
46 | 36 | cachedToken = null; // force a new token |
47 | 37 | api.postWidthEditToken( params, ok, err ); |
48 | 38 | } else { |
49 | 39 | err( code, result ); |
50 | 40 | } |
51 | 41 | }; |
52 | | - mw.log ( _method + "posting with the token that was cached " ); |
53 | 42 | api.post( params, ok, getTokenIfBad ); |
54 | 43 | } |
55 | 44 | }, |
Index: trunk/extensions/UploadWizard/resources/mw.ApiUploadHandler.js |
— | — | @@ -39,7 +39,6 @@ |
40 | 40 | */ |
41 | 41 | configureForm: function() { |
42 | 42 | var _this = this; |
43 | | - mw.log( "mw.ApiUploadHandler::configureForm> configuring form for Upload API" ); |
44 | 43 | |
45 | 44 | _this.addFormInputIfMissing( 'action', 'upload' ); |
46 | 45 | |
— | — | @@ -51,13 +50,6 @@ |
52 | 51 | |
53 | 52 | // we use JSON in HTML because according to mdale, some browsers cannot handle just JSON |
54 | 53 | _this.addFormInputIfMissing( 'format', 'jsonfm' ); |
55 | | - |
56 | | - // XXX only for testing, so it stops complaining about dupes |
57 | | - /* |
58 | | - if ( mw.UploadWizard.DEBUG ) { |
59 | | - _this.addFormInputIfMissing( 'ignorewarnings', '1' ); |
60 | | - } |
61 | | - */ |
62 | 54 | }, |
63 | 55 | |
64 | 56 | /** |
— | — | @@ -93,7 +85,6 @@ |
94 | 86 | start: function() { |
95 | 87 | var _this = this; |
96 | 88 | var ok = function() { |
97 | | - mw.log( "mw.ApiUploadHandler::start> upload start!" ); |
98 | 89 | _this.beginTime = ( new Date() ).getTime(); |
99 | 90 | _this.upload.ui.setStatus( 'mwe-upwiz-transport-started' ); |
100 | 91 | _this.upload.ui.showTransportProgress(); |
Index: trunk/extensions/UploadWizard/resources/mw.IframeTransport.js |
— | — | @@ -42,21 +42,20 @@ |
43 | 43 | * Ensure callback on completion of upload |
44 | 44 | */ |
45 | 45 | configureForm: function() { |
46 | | - mw.log( "mw.IframeTransport::configureForm> configuring form for iframe transport" ); |
47 | 46 | // Set the form target to the iframe |
48 | 47 | this.$form.attr( 'target', this.iframeId ); |
49 | 48 | |
50 | 49 | // attach an additional handler to the form, so, when submitted, it starts showing the progress |
51 | 50 | // XXX this is lame .. there should be a generic way to indicate busy status... |
52 | 51 | this.$form.submit( function() { |
53 | | - mw.log( "mw.IframeTransport::configureForm> submitting to iframe..." ); |
| 52 | + //mw.log( "mw.IframeTransport::configureForm> submitting to iframe..." ); |
54 | 53 | return true; |
55 | 54 | } ); |
56 | 55 | |
57 | 56 | // Set up the completion callback |
58 | 57 | var _this = this; |
59 | 58 | $j( '#' + this.iframeId ).load( function() { |
60 | | - mw.log( "mw.IframeTransport::configureForm> received result in iframe" ); |
| 59 | + //mw.log( "mw.IframeTransport::configureForm> received result in iframe" ); |
61 | 60 | _this.progressCb( 1.0 ); |
62 | 61 | _this.processIframeResult( $j( this ).get( 0 ) ); |
63 | 62 | } ); |
— | — | @@ -73,13 +72,13 @@ |
74 | 73 | var doc = iframe.contentDocument ? iframe.contentDocument : frames[iframe.id].document; |
75 | 74 | // Fix for Opera 9.26 |
76 | 75 | if ( doc.readyState && doc.readyState != 'complete' ) { |
77 | | - mw.log( "mw.IframeTransport::processIframeResult> not complete" ); |
| 76 | + //mw.log( "mw.IframeTransport::processIframeResult> not complete" ); |
78 | 77 | return; |
79 | 78 | } |
80 | 79 | |
81 | 80 | // Fix for Opera 9.64 |
82 | 81 | if ( doc.body && doc.body.innerHTML == "false" ) { |
83 | | - mw.log( "mw.IframeTransport::processIframeResult> innerhtml" ); |
| 82 | + //mw.log( "mw.IframeTransport::processIframeResult> innerhtml" ); |
84 | 83 | return; |
85 | 84 | } |
86 | 85 | var response; |
— | — | @@ -92,7 +91,7 @@ |
93 | 92 | // according to mdale we need to do this |
94 | 93 | // because IE does not load JSON properly in an iframe |
95 | 94 | json = $j( doc.body ).find( 'pre' ).text(); |
96 | | - mw.log( "mw.IframeTransport::processIframeResult> iframe:json::" + json ); |
| 95 | + // mw.log( "mw.IframeTransport::processIframeResult> iframe:json::" + json ); |
97 | 96 | // check that the JSON is not an XML error message |
98 | 97 | // (this happens when user aborts upload, we get the API docs in XML wrapped in HTML) |
99 | 98 | if ( json && json.substring(0, 5) !== '<?xml' ) { |