Index: trunk/phase3/includes/specials/SpecialUpload.php |
— | — | @@ -996,8 +996,19 @@ |
997 | 997 | $wgOut->addHTML( "<h2>{$sub}</h2>\n" . |
998 | 998 | "<span class='error'>{$msg}</span>\n" ); |
999 | 999 | } |
| 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 | + |
1000 | 1011 | $wgOut->addHTML( '<div id="uploadtext">' ); |
1001 | | - $wgOut->addWikiMsg( 'uploadtext', $this->mDesiredDestName ); |
| 1012 | + $wgOut->addWikiMsg( $uploadMsgName, $this->mDesiredDestName ); |
1002 | 1013 | $wgOut->addHTML( "</div>\n" ); |
1003 | 1014 | |
1004 | 1015 | # Print a list of allowed file extensions, if so configured. We ignore |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -259,6 +259,8 @@ |
260 | 260 | * Make "Did you mean" search feature more noticeable |
261 | 261 | * (bug 16720) Transcluded Special:NewPages processes "/username=" |
262 | 262 | * 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 |
263 | 265 | |
264 | 266 | === Bug fixes in 1.14 === |
265 | 267 | |