Index: trunk/extensions/UploadWizard/resources/mw.Api.category.js |
— | — | @@ -52,10 +52,8 @@ |
53 | 53 | var ok = function( data ) { |
54 | 54 | var texts = []; |
55 | 55 | if ( data.query && data.query.allpages ) { |
56 | | - // API returns an array of objects like |
57 | | - // allpages: [ {'*':'foo'}, {'*':'bar'} ] |
58 | 56 | $.each( data.query.allpages, function( i, category ) { |
59 | | - texts.push( category.title.substr(9) ); // the substr removes Category: from the title. |
| 57 | + texts.push( new mw.Title( category.title ).getNameText() ); |
60 | 58 | } ); |
61 | 59 | } |
62 | 60 | callback( texts ); |