Index: trunk/extensions/UploadWizard/resources/mw.DestinationChecker.js |
— | — | @@ -126,8 +126,8 @@ |
127 | 127 | 'iiurlwidth': 150 |
128 | 128 | }; |
129 | 129 | |
130 | | - // Do the destination check |
131 | | - _this.api.get( params, function( data ) { |
| 130 | + |
| 131 | + var ok = function( data ) { |
132 | 132 | // Remove spinner |
133 | 133 | _this.spinner( false ); |
134 | 134 | |
— | — | @@ -138,7 +138,7 @@ |
139 | 139 | |
140 | 140 | if ( !data || !data.query || !data.query.pages ) { |
141 | 141 | // Ignore a null result |
142 | | - mw.log("mw.DestinationChecker::checkUnique> No data in checkUnique result"); |
| 142 | + mw.log("mw.DestinationChecker::checkUnique> No data in checkUnique result", 'debug'); |
143 | 143 | return; |
144 | 144 | } |
145 | 145 | |
— | — | @@ -181,7 +181,16 @@ |
182 | 182 | _this.processResult( result ); |
183 | 183 | } |
184 | 184 | |
185 | | - } ); |
| 185 | + }; |
| 186 | + |
| 187 | + var err = function( code, result ) { |
| 188 | + _this.spinner( false ); |
| 189 | + mw.log("mw.DestinationChecker::checkUnique> error in checkUnique result: " + code, 'debug'); |
| 190 | + return; |
| 191 | + }; |
| 192 | + |
| 193 | + // Do the destination check |
| 194 | + _this.api.get( params, { ok: ok, err: err } ); |
186 | 195 | } |
187 | 196 | |
188 | 197 | }; |