Index: trunk/extensions/UploadWizard/resources/mw.UploadWizardLicenseInput.js |
— | — | @@ -486,8 +486,6 @@ |
487 | 487 | var templates = []; |
488 | 488 | accumTemplates( ast, templates ); |
489 | 489 | |
490 | | - // TODO config |
491 | | - var topCat = new mw.Title( 'License tags', 'category' ); |
492 | 490 | |
493 | 491 | // TODO caching |
494 | 492 | var found = false; |
— | — | @@ -512,9 +510,11 @@ |
513 | 511 | _this.api.getCategories( title, ok, err, false ); |
514 | 512 | } |
515 | 513 | |
| 514 | + var licenseCategory = new mw.Title( mw.UploadWizard.config.licenseCategory, 'category' ); |
| 515 | + |
516 | 516 | $.each( templates, function( i, t ) { |
517 | 517 | var title = new mw.Title( t, 'template' ); |
518 | | - recurseCategories( topCat, title, 5 ); |
| 518 | + recurseCategories( licenseCategory, title, 5 ); |
519 | 519 | if ( found ) { |
520 | 520 | return false; |
521 | 521 | } |
Index: trunk/extensions/UploadWizard/UploadWizard.config.php |
— | — | @@ -214,6 +214,9 @@ |
215 | 215 | ) |
216 | 216 | ), |
217 | 217 | |
| 218 | + // Custom wikitext must have at least one template that is a descendant of this category |
| 219 | + 'licenseCategory' => 'License tags', |
| 220 | + |
218 | 221 | // radio button selection of some licenses |
219 | 222 | 'licensesOwnWork' => array( |
220 | 223 | 'type' => 'or', |