r105628 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r105627‎ | r105628 | r105629 >
Date:00:24, 9 December 2011
Author:neilk
Status:ok
Tags:
Comment:
language-neutral category names
Modified paths:
  • /trunk/extensions/UploadWizard/resources/mw.Api.category.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UploadWizard/resources/mw.Api.category.js
@@ -52,10 +52,8 @@
5353 var ok = function( data ) {
5454 var texts = [];
5555 if ( data.query && data.query.allpages ) {
56 - // API returns an array of objects like
57 - // allpages: [ {'*':'foo'}, {'*':'bar'} ]
5856 $.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() );
6058 } );
6159 }
6260 callback( texts );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r103523Category autocomplete now only suggests categories that have corresponding de...raindrift23:28, 17 November 2011

Status & tagging log