r93267 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r93266‎ | r93267 | r93268 >
Date:14:23, 27 July 2011
Author:jeroendedauw
Status:ok
Tags:
Comment:
added option set a list of default visible cats
Modified paths:
  • /trunk/extensions/UploadWizard/UploadWizard.config.php (modified) (history)
  • /trunk/extensions/UploadWizard/UploadWizard.i18n.php (modified) (history)
  • /trunk/extensions/UploadWizard/includes/UploadWizardCampaign.php (modified) (history)
  • /trunk/extensions/UploadWizard/resources/mw.UploadWizardDetails.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UploadWizard/UploadWizard.config.php
@@ -15,12 +15,15 @@
1616 // The default api url is for the current wiki ( can override at run time )
1717 'apiUrl' => $wgServer . $wgScriptPath . '/api.php',
1818
19 - // Categories to automatically add all uploaded images into.
 19+ // Categories to automatically (and silently) add all uploaded images into.
2020 'autoCategories' => array(),
2121
2222 // Deprecated: use autoCategories
2323 'autoCategory' => '',
2424
 25+ // Categories to list by default in the list of cats to add.
 26+ 'defaultCategories' => array( 'Foobar', 'Locations' ),
 27+
2528 // 'licenses' is a list of licenses you could possibly use elsewhere, for instance in
2629 // licensesOwnWork or licensesThirdParty.
2730 // It just describes what licenses go with what wikitext, and how to display them in
Index: trunk/extensions/UploadWizard/includes/UploadWizardCampaign.php
@@ -153,6 +153,7 @@
154154 return array(
155155 'skipTutorial' => 'check',
156156 'autoCategories' => 'text',
 157+ 'defaultCategories' => 'text',
157158 );
158159 }
159160
Index: trunk/extensions/UploadWizard/UploadWizard.i18n.php
@@ -299,7 +299,8 @@
300300 'mwe-upwiz-campaign-name' => 'Campaign name',
301301 'mwe-upwiz-campaign-enabled' => 'Campaign enabled',
302302 'mwe-upwiz-campaign-conf-skipTutorial' => 'Skip the licensing tutorial',
303 - 'mwe-upwiz-campaign-conf-autoCategories' => 'Categories to add the images to automatically',
 303+ 'mwe-upwiz-campaign-conf-autoCategories' => 'Categories to add the files to automatically and silently',
 304+ 'mwe-upwiz-campaign-conf-defaultCategories' => 'Default categories to list in the describe tab',
304305
305306 // Coolcats
306307 'mw-coolcats-confirm-new-title' => 'Confirm new category',
Index: trunk/extensions/UploadWizard/resources/mw.UploadWizardDetails.js
@@ -275,7 +275,8 @@
276276 .mwCoolCats( {
277277 api: _this.upload.api,
278278 hiddenCats: hiddenCats,
279 - buttontext: gM( 'mwe-upwiz-categories-add' )
 279+ buttontext: gM( 'mwe-upwiz-categories-add' ) ,
 280+ cats: mw.isDefined( mw.UploadWizard.config.defaultCategories ) ? mw.UploadWizard.config.defaultCategories : []
280281 } );
281282
282283 };

Status & tagging log