r45498 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r45497‎ | r45498 | r45499 >
Date:13:07, 7 January 2009
Author:ialex
Status:reverted (Comments)
Tags:
Comment:
Special:Upload can now have a custom upload message instead of uploadtext by passing "uploadmsg" parameter in the url.
Message name is MediaWiki:Uploadtext-custom if the page is called with Special:Upload?uploadmsg=custom.
The default message will be used if the custom messages doesn't exist.
This should fix the Commons "uselang" hack on for Special:Upload.
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
@@ -996,8 +996,19 @@
997997 $wgOut->addHTML( "<h2>{$sub}</h2>\n" .
998998 "<span class='error'>{$msg}</span>\n" );
999999 }
 1000+
 1001+ $uploadMsg = $wgRequest->getVal( 'uploadmsg' );
 1002+ if( $uploadMsg ) {
 1003+ $uploadMsgName = 'uploadtext-' . $uploadMsg;
 1004+ // Fall back to normal message if the custom messages is empty
 1005+ if( wfEmptyMsg( $uploadMsgName, wfMsg( $uploadMsgName ) ) )
 1006+ $uploadMsgName = 'uploadtext';
 1007+ } else {
 1008+ $uploadMsgName = 'uploadtext';
 1009+ }
 1010+
10001011 $wgOut->addHTML( '<div id="uploadtext">' );
1001 - $wgOut->addWikiMsg( 'uploadtext', $this->mDesiredDestName );
 1012+ $wgOut->addWikiMsg( $uploadMsgName, $this->mDesiredDestName );
10021013 $wgOut->addHTML( "</div>\n" );
10031014
10041015 # Print a list of allowed file extensions, if so configured. We ignore
Index: trunk/phase3/RELEASE-NOTES
@@ -259,6 +259,8 @@
260260 * Make "Did you mean" search feature more noticeable
261261 * (bug 16720) Transcluded Special:NewPages processes "/username="
262262 * Added "Advanced search" link to the search form
 263+* Special:Upload can now have a custom upload message instead of uploadtext by
 264+ passing "uploadmsg" parameter in the url
263265
264266 === Bug fixes in 1.14 ===
265267

Follow-up revisions

RevisionCommit summaryAuthorDate
r46394Revert r45498 "Special:Upload can now have a custom upload message instead of...brion22:41, 27 January 2009

Comments

#Comment by Brion VIBBER (talk | contribs)   18:07, 13 January 2009

The uselang hacks seem to cover much more than the intro text; for instance the license drop-down selectors are different in different variants.

Can you confirm that this has been run by the Commons community and that this is something they want and will use?

#Comment by IAlex (talk | contribs)   18:23, 13 January 2009

No, I didn't ask Commons community.

For the license drop-down, I thought it wouldn't need to be changed since there's one version for all english variants.

#Comment by Brion VIBBER (talk | contribs)   22:42, 27 January 2009

Reverted in r46394.

Status & tagging log