r101604 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r101603‎ | r101604 | r101605 >
Date:09:33, 2 November 2011
Author:neilk
Status:ok
Tags:
Comment:
make top license tag configurable
Modified paths:
  • /trunk/extensions/UploadWizard/UploadWizard.config.php (modified) (history)
  • /trunk/extensions/UploadWizard/resources/mw.UploadWizardLicenseInput.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UploadWizard/resources/mw.UploadWizardLicenseInput.js
@@ -486,8 +486,6 @@
487487 var templates = [];
488488 accumTemplates( ast, templates );
489489
490 - // TODO config
491 - var topCat = new mw.Title( 'License tags', 'category' );
492490
493491 // TODO caching
494492 var found = false;
@@ -512,9 +510,11 @@
513511 _this.api.getCategories( title, ok, err, false );
514512 }
515513
 514+ var licenseCategory = new mw.Title( mw.UploadWizard.config.licenseCategory, 'category' );
 515+
516516 $.each( templates, function( i, t ) {
517517 var title = new mw.Title( t, 'template' );
518 - recurseCategories( topCat, title, 5 );
 518+ recurseCategories( licenseCategory, title, 5 );
519519 if ( found ) {
520520 return false;
521521 }
Index: trunk/extensions/UploadWizard/UploadWizard.config.php
@@ -214,6 +214,9 @@
215215 )
216216 ),
217217
 218+ // Custom wikitext must have at least one template that is a descendant of this category
 219+ 'licenseCategory' => 'License tags',
 220+
218221 // radio button selection of some licenses
219222 'licensesOwnWork' => array(
220223 'type' => 'or',

Status & tagging log