Index: trunk/extensions/UploadWizard/UploadWizardHooks.php |
— | — | @@ -543,7 +543,7 @@ |
544 | 544 | * |
545 | 545 | * @return string |
546 | 546 | */ |
547 | | - public static function getLicenseMessage( $licenseName, array &$licenseConfig ) { |
| 547 | + public static function getLicenseMessage( $licenseName, array $licenseConfig ) { |
548 | 548 | if ( array_key_exists( 'url', $licenseConfig[$licenseName] ) ) { |
549 | 549 | return wfMsgExt( $licenseConfig[$licenseName]['msg'], 'parseinline', '', $licenseConfig[$licenseName]['url'] ); |
550 | 550 | } |
Index: trunk/extensions/UploadWizard/includes/specials/SpecialUploadCampaign.php |
— | — | @@ -79,13 +79,6 @@ |
80 | 80 | $fields['Campaignname'] = array ( 'type' => 'text', 'default' => $this->subPage, 'label-message' => 'mwe-upwiz-campaign-name' ); |
81 | 81 | $fields['Campaignenabled'] = array ( 'type' => 'check', 'default' => $enabled, 'label-message' => 'mwe-upwiz-campaign-enabled' ); |
82 | 82 | |
83 | | - // show _ALL_ the licenses! |
84 | | - $standardConfig = UploadWizardConfig::getConfig(); |
85 | | - foreach ( $standardConfig['licenses'] as $key => $license ) { |
86 | | - $configFields['licensesOwnWork']['options'][ wfMsg( $license['msg'] ) ] = $key; |
87 | | - $configFields['defaultOwnWorkLicence']['options'][ wfMsg( $license['msg'] ) ] = $key; |
88 | | - } |
89 | | - |
90 | 83 | foreach ( $configFields as $name => $data ) { |
91 | 84 | $data['label-message'] = 'mwe-upwiz-campaign-conf-' . $name; |
92 | 85 | |
Index: trunk/extensions/UploadWizard/includes/UploadWizardCampaign.php |
— | — | @@ -213,11 +213,11 @@ |
214 | 214 | ), |
215 | 215 | ); |
216 | 216 | |
217 | | - foreach ( $globalConfig['licensesOwnWork']['licenses'] as $license ) { |
218 | | - $licenceMsg = UploadWizardHooks::getLicenseMessage( $license, $globalConfig['licenses'] ); |
219 | | - $config['licensesOwnWork']['options'][$licenceMsg] = $license; |
| 217 | + foreach ( $globalConfig['licenses'] as $licenseName => $licenseDate ) { |
| 218 | + $licenceMsg = UploadWizardHooks::getLicenseMessage( $licenseName, $globalConfig['licenses'] ); |
| 219 | + $config['licensesOwnWork']['options'][$licenceMsg] = $licenseName; |
220 | 220 | } |
221 | | - |
| 221 | + |
222 | 222 | $config['defaultOwnWorkLicence']['options'] = $config['licensesOwnWork']['options']; |
223 | 223 | |
224 | 224 | return $config; |