r59342 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r59341‎ | r59342 | r59343 >
Date:19:23, 22 November 2009
Author:raymond
Status:ok
Tags:
Comment:
Don't prefill the reason field. This is not done with any other reason field.
Add a colon to the reason label
(Yes, this has to be done to all labels, but the messages are used as table headers too and therefore it needs message duplication first)
Modified paths:
  • /trunk/extensions/Interwiki/SpecialInterwiki.i18n.php (modified) (history)
  • /trunk/extensions/Interwiki/SpecialInterwiki.php (modified) (history)
  • /trunk/extensions/Interwiki/SpecialInterwiki_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Interwiki/SpecialInterwiki_body.php
@@ -80,7 +80,6 @@
8181
8282 $actionUrl = $this->getTitle()->getLocalURL( 'action=submit' );
8383 $token = $wgUser->editToken();
84 - $defaultreason = $wgRequest->getVal( 'wpInterwikiReason', wfMsgForContent( 'interwiki_defaultreason' ) );
8584
8685 switch( $action ){
8786 case 'delete':
@@ -99,7 +98,7 @@
10099 "<tr><td>$deletingmessage</td></tr>".
101100 '<tr><td class="mw-label">' . Xml::label( $reasonmessage, 'mw-interwiki-deletereason' ) . '</td>' .
102101 '<td class="mw-input">' .
103 - Xml::input( 'wpInterwikiReason', 60, $defaultreason, array( 'tabindex' => '1', 'id' => 'mw-interwiki-deletereason', 'maxlength' => '200' ) ) .
 102+ Xml::input( 'wpInterwikiReason', 60, '', array( 'tabindex' => '1', 'id' => 'mw-interwiki-deletereason', 'maxlength' => '200' ) ) .
104103 '</td></tr>' .
105104 '<tr><td></td><td class="mw-submit">' . Xml::submitButton( $button, array( 'id' => 'mw-interwiki-submit' ) ) .
106105 Xml::hidden( 'wpInterwikiPrefix', $prefix ) .
@@ -148,8 +147,7 @@
149148 $urlmessage = wfMsg( 'interwiki_url' );
150149
151150 $wgOut->addHTML(
152 - Xml::openElement( 'fieldset' ) .
153 - Xml::element( 'legend', null, $topmessage ) .
 151+ Xml::fieldset( $topmessage ) .
154152 $intromessage .
155153 Xml::openElement( 'form', array( 'id' => 'mw-interwiki-editform', 'method' => 'post', 'action' => $actionUrl ) ) .
156154 Xml::openElement( 'table', array( 'id' => "mw-interwiki-$action" ) ) .
@@ -161,7 +159,7 @@
162160 '<tr><td class="mw-label">' . Xml::label( $urlmessage, 'mw-interwiki-url' ) . '</td>' .
163161 '<td class="mw-input">' . Xml::input( 'wpInterwikiURL', 60, $defaulturl, array( 'tabindex' => '1', 'maxlength' => '200', 'id' => 'mw-interwiki-url' ) ) . '</td></tr>' .
164162 '<tr><td class="mw-label">' . Xml::label( $reasonmessage, 'mw-interwiki-editreason' ) . '</td>' .
165 - '<td class="mw-input">' . Xml::input( 'wpInterwikiReason', 60, $defaultreason, array( 'tabindex' => '1', 'id' => 'mw-interwiki-editreason', 'maxlength' => '200' ) ) .
 163+ '<td class="mw-input">' . Xml::input( 'wpInterwikiReason', 60, '', array( 'tabindex' => '1', 'id' => 'mw-interwiki-editreason', 'maxlength' => '200' ) ) .
166164 Xml::hidden( 'wpInterwikiAction', $action ) .
167165 $old .
168166 Xml::hidden( 'wpEditToken', $token ) .
Index: trunk/extensions/Interwiki/SpecialInterwiki.i18n.php
@@ -50,8 +50,7 @@
5151
5252 # modifying permitted
5353 'interwiki_edit' => 'Edit',
54 - 'interwiki_reasonfield' => 'Reason',
55 - 'interwiki_defaultreason' => 'no reason given',
 54+ 'interwiki_reasonfield' => 'Reason:',
5655
5756 # deleting a prefix
5857 'interwiki_delquestion' => 'Deleting "$1"',
Index: trunk/extensions/Interwiki/SpecialInterwiki.php
@@ -26,7 +26,7 @@
2727 'path' => __FILE__,
2828 'name' => 'SpecialInterwiki',
2929 'author' => array( 'Stephanie Amanda Stevens', 'SPQRobin', 'others' ),
30 - 'version' => '1.3',
 30+ 'version' => '1.3.1',
3131 'url' => 'http://www.mediawiki.org/wiki/Extension:SpecialInterwiki',
3232 'description' => 'Adds a [[Special:Interwiki|special page]] to view and edit the interwiki table',
3333 'descriptionmsg' => 'interwiki-desc',

Follow-up revisions

RevisionCommit summaryAuthorDate
r59347Follow-up to r59342: separate column headers and field labels...siebrand22:41, 22 November 2009

Status & tagging log