r87866 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87865‎ | r87866 | r87867 >
Date:01:30, 11 May 2011
Author:kaldari
Status:ok
Tags:
Comment:
fixing so that default configuration doesnt give an error, also clarifying how to use the autoCategory config var
Modified paths:
  • /trunk/extensions/UploadWizard/UploadWizard.config.php (modified) (history)
  • /trunk/extensions/UploadWizard/resources/mw.UploadWizardDetails.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UploadWizard/UploadWizard.config.php
@@ -15,8 +15,8 @@
1616 // The default api url is for the current wiki ( can override at run time )
1717 'apiUrl' => $wgServer . $wgScriptPath . '/api.php',
1818
19 - // If the uploaded file should be auto categorized
20 - 'autoCategory' => false,
 19+ // Category to automatically add all uploaded images into. Leave empty for none.
 20+ 'autoCategory' => '',
2121
2222 // 'licenses' is a list of licenses you could possibly use elsewhere, for instance in
2323 // licensesOwnWork or licensesThirdParty.
Index: trunk/extensions/UploadWizard/resources/mw.UploadWizardDetails.js
@@ -255,7 +255,7 @@
256256
257257 // make this a category picker
258258 var hiddenCats = [];
259 - if ( mw.isDefined( mw.UploadWizard.config.autoCategory ) ) {
 259+ if ( mw.isDefined( mw.UploadWizard.config.autoCategory ) && mw.UploadWizard.config.autoCategory !== '' ) {
260260 hiddenCats.push( mw.UploadWizard.config.autoCategory );
261261 }
262262 $categoriesDiv.find( '.mwe-upwiz-details-input' )

Status & tagging log