r78997 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r78996‎ | r78997 | r78998 >
Date:12:33, 25 December 2010
Author:nikerabbit
Status:ok (Comments)
Tags:
Comment:
Same for the tooltip, don't call twice
Modified paths:
  • /trunk/phase3/includes/Linker.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Linker.php
@@ -1634,10 +1634,12 @@
16351635 public function titleAttrib( $name, $options = null ) {
16361636 wfProfileIn( __METHOD__ );
16371637
1638 - if ( wfEmptyMsg( "tooltip-$name" ) ) {
 1638+ $message = wfMessage( "tooltip-$name" );
 1639+
 1640+ if ( !$message->exists() ) {
16391641 $tooltip = false;
16401642 } else {
1641 - $tooltip = wfMsg( "tooltip-$name" );
 1643+ $tooltip = $message->text();
16421644 # Compatibility: formerly some tooltips had [alt-.] hardcoded
16431645 $tooltip = preg_replace( "/ ?\[alt-.\]$/", '', $tooltip );
16441646 # Message equal to '-' means suppress it.

Comments

#Comment by Happy-melon (talk | contribs)   21:30, 23 March 2011

This calls Message::text(), while r78995 calls Message::plain(). Is there a reason for the difference?

#Comment by Nikerabbit (talk | contribs)   09:10, 26 March 2011

I doubt that. Most like an oversight.

Status & tagging log