r68000 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r67999‎ | r68000 | r68001 >
Date:16:19, 14 June 2010
Author:raymond
Status:ok
Tags:
Comment:
Use present function for adding accesskey. This way the browser key combination is set as the button title and the access key is customizable.
Modified paths:
  • /trunk/phase3/includes/specials/SpecialBlockip.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialExport.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialImport.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialUserrights.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.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
@@ -2299,6 +2299,10 @@
23002300 'accesskey-upload',
23012301 'accesskey-preferences-save',
23022302 'accesskey-summary',
 2303+ 'accesskey-userrights-set',
 2304+ 'accesskey-blockip-block',
 2305+ 'accesskey-export',
 2306+ 'accesskey-import',
23032307 ),
23042308 'tooltips' => array(
23052309 'tooltip-pt-userpage',
Index: trunk/phase3/maintenance/language/messageTypes.inc
@@ -71,6 +71,10 @@
7272 'accesskey-upload',
7373 'accesskey-preferences-save',
7474 'accesskey-summary',
 75+ 'accesskey-userrights-set',
 76+ 'accesskey-blockip-block',
 77+ 'accesskey-export',
 78+ 'accesskey-import',
7579 'addsection',
7680 'talkpageheader',
7781 'anonnotice',
Index: trunk/phase3/includes/specials/SpecialUserrights.php
@@ -441,7 +441,8 @@
442442 <tr>
443443 <td></td>
444444 <td class='mw-submit'>" .
445 - Xml::submitButton( wfMsg( 'saveusergroups' ), array( 'name' => 'saveusergroups', 'accesskey' => 's' ) ) .
 445+ Xml::submitButton( wfMsg( 'saveusergroups' ),
 446+ array( 'name' => 'saveusergroups' ) + $wgUser->getSkin()->tooltipAndAccessKeyAttribs( 'userrights-set' ) ) .
446447 "</td>
447448 </tr>" .
448449 Xml::closeElement( 'table' ) . "\n" .
Index: trunk/phase3/includes/specials/SpecialImport.php
@@ -257,7 +257,7 @@
258258 <td>
259259 </td>
260260 <td class='mw-submit'>" .
261 - Xml::submitButton( wfMsg( 'import-interwiki-submit' ), array( 'accesskey' => 's' ) ) .
 261+ Xml::submitButton( wfMsg( 'import-interwiki-submit' ), $wgUser->getSkin()->tooltipAndAccessKeyAttribs( 'import' ) ) .
262262 "</td>
263263 </tr>" .
264264 Xml::closeElement( 'table' ).
Index: trunk/phase3/includes/specials/SpecialExport.php
@@ -33,7 +33,7 @@
3434 public function execute( $par ) {
3535 global $wgOut, $wgRequest, $wgSitename, $wgExportAllowListContributors;
3636 global $wgExportAllowHistory, $wgExportMaxHistory, $wgExportMaxLinkDepth;
37 - global $wgExportFromNamespaces;
 37+ global $wgExportFromNamespaces, $wgUser;
3838
3939 $this->setHeaders();
4040 $this->outputHeader();
@@ -172,7 +172,7 @@
173173 //$form .= Xml::checkLabel( wfMsg( 'export-images' ), 'images', 'wpExportImages', false ) . '<br />';
174174 $form .= Xml::checkLabel( wfMsg( 'export-download' ), 'wpDownload', 'wpDownload', true ) . '<br />';
175175
176 - $form .= Xml::submitButton( wfMsg( 'export-submit' ), array( 'accesskey' => 's' ) );
 176+ $form .= Xml::submitButton( wfMsg( 'export-submit' ), $wgUser->getSkin()->tooltipAndAccessKeyAttribs( 'export' ) );
177177 $form .= Xml::closeElement( 'form' );
178178 $wgOut->addHTML( $form );
179179 }
Index: trunk/phase3/includes/specials/SpecialBlockip.php
@@ -337,7 +337,8 @@
338338 <td style='padding-top: 1em'>&#160;</td>
339339 <td class='mw-submit' style='padding-top: 1em'>" .
340340 Xml::submitButton( wfMsg( $alreadyBlocked ? 'ipb-change-block' : 'ipbsubmit' ),
341 - array( 'name' => 'wpBlock', 'tabindex' => '13', 'accesskey' => 's' ) ) . "
 341+ array( 'name' => 'wpBlock', 'tabindex' => '13' )
 342+ + $wgUser->getSkin()->tooltipAndAccessKeyAttribs( 'blockip-block' ) ). "
342343 </td>
343344 </tr>" .
344345 Xml::closeElement( 'table' ) .
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -3335,6 +3335,10 @@
33363336 'accesskey-upload' => 's', # do not translate or duplicate this message to other languages
33373337 'accesskey-preferences-save' => 's', # do not translate or duplicate this message to other languages
33383338 'accesskey-summary' => 'b', # do not translate or duplicate this message to other languages
 3339+'accesskey-userrights-set' => 's', # do not translate or duplicate this message to other languages
 3340+'accesskey-blockip-block' => 's', # do not translate or duplicate this message to other languages
 3341+'accesskey-export' => 's', # do not translate or duplicate this message to other languages
 3342+'accesskey-import' => 's', # do not translate or duplicate this message to other languages
33393343
33403344 # Tooltip help for the actions
33413345 'tooltip-pt-userpage' => 'Your user page',

Status & tagging log