r91399 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r91398‎ | r91399 | r91400 >
Date:08:28, 4 July 2011
Author:ialex
Status:ok
Tags:
Comment:
Changed calls to Linker::tooltipAndAccesskeyAttribs() to be static and fixed casing in method's name
Modified paths:
  • /trunk/phase3/includes/EditPage.php (modified) (history)
  • /trunk/phase3/includes/HTMLForm.php (modified) (history)
  • /trunk/phase3/includes/HistoryPage.php (modified) (history)
  • /trunk/phase3/includes/SkinTemplate.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)

Diff [purge]

Index: trunk/phase3/includes/EditPage.php
@@ -1634,7 +1634,6 @@
16351635 * @return array An array in the format array( $label, $input )
16361636 */
16371637 function getSummaryInput($summary = "", $labelText = null, $inputAttrs = null, $spanLabelAttrs = null) {
1638 - global $wgUser;
16391638 //Note: the maxlength is overriden in JS to 250 and to make it use UTF-8 bytes, not characters.
16401639 $inputAttrs = ( is_array($inputAttrs) ? $inputAttrs : array() ) + array(
16411640 'id' => 'wpSummary',
@@ -1642,7 +1641,7 @@
16431642 'tabindex' => '1',
16441643 'size' => 60,
16451644 'spellcheck' => 'true',
1646 - ) + $wgUser->getSkin()->tooltipAndAccessKeyAttribs( 'summary' );
 1645+ ) + Linker::tooltipAndAccesskeyAttribs( 'summary' );
16471646
16481647 $spanLabelAttrs = ( is_array($spanLabelAttrs) ? $spanLabelAttrs : array() ) + array(
16491648 'class' => $this->missingSummary ? 'mw-summarymissed' : 'mw-summary',
Index: trunk/phase3/includes/HTMLForm.php
@@ -460,7 +460,7 @@
461461 }
462462
463463 if ( isset( $this->mSubmitTooltip ) ) {
464 - $attribs += Linker::tooltipAndAccessKeyAttribs( $this->mSubmitTooltip );
 464+ $attribs += Linker::tooltipAndAccesskeyAttribs( $this->mSubmitTooltip );
465465 }
466466
467467 $attribs['class'] = 'mw-htmlform-submit';
@@ -1037,7 +1037,7 @@
10381038 if ( empty( $this->mParams['tooltip'] ) ) {
10391039 return array();
10401040 }
1041 - return Linker::tooltipAndAccessKeyAttribs( $this->mParams['tooltip'] );
 1041+ return Linker::tooltipAndAccesskeyAttribs( $this->mParams['tooltip'] );
10421042 }
10431043
10441044 /**
Index: trunk/phase3/includes/HistoryPage.php
@@ -397,7 +397,7 @@
398398 $this->buttons = '<div>';
399399 $this->buttons .= $this->submitButton( wfMsg( 'compareselectedversions' ),
400400 array( 'class' => 'historysubmit' )
401 - + $wgUser->getSkin()->tooltipAndAccessKeyAttribs( 'compareselectedversions' )
 401+ + Linker::tooltipAndAccesskeyAttribs( 'compareselectedversions' )
402402 ) . "\n";
403403
404404 if ( $wgUser->isAllowed( 'deleterevision' ) ) {
Index: trunk/phase3/includes/SkinTemplate.php
@@ -1594,7 +1594,7 @@
15951595 } else {
15961596 $attrs = array_merge(
15971597 $attrs,
1598 - $this->skin->tooltipAndAccesskeyAttribs( $item['single-id'] )
 1598+ Linker::tooltipAndAccesskeyAttribs( $item['single-id'] )
15991599 );
16001600 }
16011601 }
@@ -1665,7 +1665,7 @@
16661666 'name' => 'search',
16671667 'value' => isset( $this->data['search'] ) ? $this->data['search'] : '',
16681668 );
1669 - $realAttrs = array_merge( $realAttrs, $this->skin->tooltipAndAccesskeyAttribs( 'search' ), $attrs );
 1669+ $realAttrs = array_merge( $realAttrs, Linker::tooltipAndAccesskeyAttribs( 'search' ), $attrs );
16701670 return Html::element( 'input', $realAttrs );
16711671 }
16721672
@@ -1681,7 +1681,7 @@
16821682 );
16831683 $realAttrs = array_merge(
16841684 $realAttrs,
1685 - $this->skin->tooltipAndAccesskeyAttribs( "search-$mode" ),
 1685+ Linker::tooltipAndAccesskeyAttribs( "search-$mode" ),
16861686 $attrs
16871687 );
16881688 return Html::element( 'input', $realAttrs );
@@ -1692,7 +1692,7 @@
16931693 );
16941694 $buttonAttrs = array_merge(
16951695 $buttonAttrs,
1696 - $this->skin->tooltipAndAccesskeyAttribs( 'search-fulltext' ),
 1696+ Linker::tooltipAndAccesskeyAttribs( 'search-fulltext' ),
16971697 $attrs
16981698 );
16991699 unset( $buttonAttrs['src'] );
Index: trunk/phase3/includes/specials/SpecialUserrights.php
@@ -463,7 +463,7 @@
464464 <td></td>
465465 <td class='mw-submit'>" .
466466 Xml::submitButton( wfMsg( 'saveusergroups' ),
467 - array( 'name' => 'saveusergroups' ) + $this->getSkin()->tooltipAndAccessKeyAttribs( 'userrights-set' ) ) .
 467+ array( 'name' => 'saveusergroups' ) + Linker::tooltipAndAccesskeyAttribs( 'userrights-set' ) ) .
468468 "</td>
469469 </tr>" .
470470 Xml::closeElement( 'table' ) . "\n" .
Index: trunk/phase3/includes/specials/SpecialImport.php
@@ -292,7 +292,7 @@
293293 <td>
294294 </td>
295295 <td class='mw-submit'>" .
296 - Xml::submitButton( wfMsg( 'import-interwiki-submit' ), $this->getSkin()->tooltipAndAccessKeyAttribs( 'import' ) ) .
 296+ Xml::submitButton( wfMsg( 'import-interwiki-submit' ), Linker::tooltipAndAccesskeyAttribs( 'import' ) ) .
297297 "</td>
298298 </tr>" .
299299 Xml::closeElement( 'table' ).
Index: trunk/phase3/includes/specials/SpecialExport.php
@@ -215,7 +215,7 @@
216216 $wgRequest->wasPosted() ? $wgRequest->getCheck( 'wpDownload' ) : true
217217 ) . '<br />';
218218
219 - $form .= Xml::submitButton( wfMsg( 'export-submit' ), $this->getSkin()->tooltipAndAccessKeyAttribs( 'export' ) );
 219+ $form .= Xml::submitButton( wfMsg( 'export-submit' ), Linker::tooltipAndAccesskeyAttribs( 'export' ) );
220220 $form .= Xml::closeElement( 'form' );
221221
222222 $wgOut->addHTML( $form );

Status & tagging log