From 023419b2d26a58b579806a25dc8ea40a12ed2db1 Mon Sep 17 00:00:00 2001 From: Derk-Jan Hartman Date: Tue, 4 May 2010 15:07:37 +0000 Subject: [PATCH] Do not add the license selector when uploading a new version of a file When using "upload a new version", the information in the license field is ignored during submit. The field has no use in this mode because the information is only added in the filelog, not on the filepage. As such we should just not add it at all when uploading a new version. This closes bug 23241. --- RELEASE-NOTES | 2 ++ includes/specials/SpecialUpload.php | 14 ++++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 87eb1014a5..c338b6544d 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -146,6 +146,8 @@ in a negative namespace (which is invalid). are now checked when loading Special:Upload. Toolbar link for Special:Upload is no longer shown if the user does not have the required permissions. * (Bug 23397) texvc in html mode renders \sim as ˜ not ∼ +* (Bug 23241) Remove License selector, because it is not used when uploading a + new version. === API changes in 1.17 === * (bug 22738) Allow filtering by action type on query=logevent diff --git a/includes/specials/SpecialUpload.php b/includes/specials/SpecialUpload.php index 6a54294aaf..154f4a6f3d 100644 --- a/includes/specials/SpecialUpload.php +++ b/includes/specials/SpecialUpload.php @@ -925,17 +925,19 @@ class UploadForm extends HTMLForm { 'EditTools' => array( 'type' => 'edittools', 'section' => 'description', - ), - 'License' => array( + ) + ); + + if ( $this->mForReUpload ) { + $descriptor['DestFile']['readonly'] = true; + } else { + $descriptor['License'] = array( 'type' => 'select', 'class' => 'Licenses', 'section' => 'description', 'id' => 'wpLicense', 'label-message' => 'license', - ), - ); - if ( $this->mForReUpload ) { - $descriptor['DestFile']['readonly'] = true; + ); } global $wgUseCopyrightUpload; -- 2.20.1