r65899 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r65898‎ | r65899 | r65900 >
Date:15:07, 4 May 2010
Author:hartman
Status:ok (Comments)
Tags:
Comment:
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.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/specials/SpecialUpload.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialUpload.php
@@ -925,17 +925,19 @@
926926 'EditTools' => array(
927927 'type' => 'edittools',
928928 'section' => 'description',
929 - ),
930 - 'License' => array(
 929+ )
 930+ );
 931+
 932+ if ( $this->mForReUpload ) {
 933+ $descriptor['DestFile']['readonly'] = true;
 934+ } else {
 935+ $descriptor['License'] = array(
931936 'type' => 'select',
932937 'class' => 'Licenses',
933938 'section' => 'description',
934939 'id' => 'wpLicense',
935940 'label-message' => 'license',
936 - ),
937 - );
938 - if ( $this->mForReUpload ) {
939 - $descriptor['DestFile']['readonly'] = true;
 941+ );
940942 }
941943
942944 global $wgUseCopyrightUpload;
Index: trunk/phase3/RELEASE-NOTES
@@ -146,6 +146,8 @@
147147 are now checked when loading Special:Upload. Toolbar link for Special:Upload
148148 is no longer shown if the user does not have the required permissions.
149149 * (Bug 23397) texvc in html mode renders \sim as ˜ not ∼
 150+* (Bug 23241) Remove License selector, because it is not used when uploading a
 151+ new version.
150152
151153 === API changes in 1.17 ===
152154 * (bug 22738) Allow filtering by action type on query=logevent

Comments

Status & tagging log