r81103 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81102‎ | r81103 | r81104 >
Date:20:58, 27 January 2011
Author:btongminh
Status:ok
Tags:
Comment:
(bug 26929) Introduced the edittools-upload message, which will be inserted under the upload form instead of edittools if available
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/HTMLForm.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialUpload.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesQqq.php (modified) (history)
  • /trunk/phase3/maintenance/language/messageTypes.inc (modified) (history)
  • /trunk/phase3/maintenance/language/messages.inc (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/language/messages.inc
@@ -623,6 +623,7 @@
624624 'template-semiprotected',
625625 'hiddencategories',
626626 'edittools',
 627+ 'edittools-upload',
627628 'nocreatetitle',
628629 'nocreatetext',
629630 'nocreate-loggedin',
Index: trunk/phase3/maintenance/language/messageTypes.inc
@@ -296,6 +296,7 @@
297297 'pagetitle',
298298 'filename-prefix-blacklist',
299299 'edittools',
 300+ 'edittools-upload',
300301 'size-bytes',
301302 'size-kilobytes',
302303 'size-megabytes',
Index: trunk/phase3/includes/HTMLForm.php
@@ -1616,11 +1616,20 @@
16171617 }
16181618
16191619 public function getTableRow( $value ) {
1620 - return "<tr><td></td><td class=\"mw-input\">"
 1620+ if ( empty( $this->mParams['message'] ) ) {
 1621+ $msg = wfMessage( 'edittools' );
 1622+ } else {
 1623+ $msg = wfMessage( $this->mParams['message'] );
 1624+ if ( $msg->isDisabled() ) {
 1625+ $msg = wfMessage( 'edittools' );
 1626+ }
 1627+ }
 1628+ $msg->inContentLanguage();
 1629+
 1630+
 1631+ return '<tr><td></td><td class="mw-input">'
16211632 . '<div class="mw-editTools">'
1622 - . wfMsgExt( empty( $this->mParams['message'] )
1623 - ? 'edittools' : $this->mParams['message'],
1624 - array( 'parse', 'content' ) )
 1633+ . $msg->parseAsBlock()
16251634 . "</div></td></tr>\n";
16261635 }
16271636 }
Index: trunk/phase3/includes/specials/SpecialUpload.php
@@ -994,6 +994,7 @@
995995 'EditTools' => array(
996996 'type' => 'edittools',
997997 'section' => 'description',
 998+ 'message' => 'edittools-upload',
998999 )
9991000 );
10001001
Index: trunk/phase3/languages/messages/MessagesQqq.php
@@ -876,6 +876,7 @@
877877 'template-semiprotected' => 'Used on [[Special:ProtectedPages]]. Appears in brackets after listed page titles which are semi-protected.',
878878 'hiddencategories' => "This message is shown below the edit form, like you have a section ''\"Templates used on this page\"''.",
879879 'edittools' => 'This text will be shown below edit and upload forms. It can be used to offer special characters not present on most keyboards for copying/pasting, and also often makes them clickable for insertion via a javascript. Since these are seen as specific to a wiki, however, this message should not contain anything but an html comment explaining how it should be used once the wiki has been installed.',
 880+'edittools' => 'This text will be shown below upload forms. It will default to the contents of edittools.',
880881 'sectioneditnotsupported-title' => 'Page title of special page, which presumably appears when someone tries to edit a section, and section editing is disabled. Explanation of section editing on [http://meta.wikimedia.org/wiki/Help:Section_editing#Section_editing meta].',
881882 'sectioneditnotsupported-text' => 'I think this is the text of an error message, which presumably appears when someone tries to edit a section, and section editing is disabled. Explanation of section editing on [http://meta.wikimedia.org/wiki/Help:Section_editing#Section_editing meta].',
882883 'permissionserrorstext-withaction' => '* $1 is the number of reasons that were found why the action cannot be performed.
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -1377,6 +1377,7 @@
13781378 'template-semiprotected' => '(semi-protected)',
13791379 'hiddencategories' => 'This page is a member of {{PLURAL:$1|1 hidden category|$1 hidden categories}}:',
13801380 'edittools' => '<!-- Text here will be shown below edit and upload forms. -->', # only translate this message to other languages if you have to change it
 1381+'edittools-upload' => '-',
13811382 'nocreatetitle' => 'Page creation limited',
13821383 'nocreatetext' => '{{SITENAME}} has restricted the ability to create new pages.
13831384 You can go back and edit an existing page, or [[Special:UserLogin|log in or create an account]].',
Index: trunk/phase3/RELEASE-NOTES
@@ -53,6 +53,8 @@
5454 * Add width parameter to Special:Filepath to allow getting the file path of a thumbnail.
5555 * (bug 26870) Add size to {{filepath:}}
5656 * Upload warnings now show a thumbnail of the uploaded file
 57+* Introduced the edittools-upload message, which will be inserted under the
 58+ upload form instead of edittools if available
5759
5860 === Bug fixes in 1.18 ===
5961 * (bug 23119) WikiError class and subclasses are now marked as deprecated

Follow-up revisions

RevisionCommit summaryAuthorDate
r81104Fix c&p error in r81103raymond21:08, 27 January 2011

Status & tagging log