Index: trunk/extensions/UploadWizard/resources/mw.UploadWizardDetails.js |
— | — | @@ -54,7 +54,7 @@ |
55 | 55 | api: _this.upload.api, |
56 | 56 | spinner: function(bool) { _this.toggleDestinationBusy(bool); }, |
57 | 57 | preprocess: function( name ) { |
58 | | - if ( name !== '' ) { |
| 58 | + if ( name != '' ) { |
59 | 59 | // turn the contents of the input into a MediaWiki title ("File:foo_bar.jpg") to look up |
60 | 60 | return _this.upload.title.setNameText( name ).toString(); |
61 | 61 | } else { |
— | — | @@ -760,16 +760,13 @@ |
761 | 761 | _this.completeDetailsSubmission(); |
762 | 762 | }; |
763 | 763 | |
764 | | - var ok = function( result ) { |
| 764 | + var callback = function( result ) { |
765 | 765 | finalCallback( result ); |
766 | 766 | }; |
767 | | - var err = function( result ) { |
768 | | - alert( "there was an error!! OMG" ); |
769 | | - }; |
770 | 767 | |
771 | 768 | _this.upload.state = 'submitting-details'; |
772 | | - |
773 | | - _this.upload.api.postWithEditToken( params, ok, err ); |
| 769 | + // XXX this can still fail with bad filename, or other 'warnings' -- capture these |
| 770 | + _this.upload.api.postWithEditToken( params, callback ); |
774 | 771 | }, |
775 | 772 | |
776 | 773 | completeDetailsSubmission: function() { |