Same for the tooltip, don't call twice
authorNiklas Laxström <nikerabbit@users.mediawiki.org>
Sat, 25 Dec 2010 12:33:17 +0000 (12:33 +0000)
committerNiklas Laxström <nikerabbit@users.mediawiki.org>
Sat, 25 Dec 2010 12:33:17 +0000 (12:33 +0000)
includes/Linker.php

index fb1d7f1..0a22ad7 100644 (file)
@@ -1634,10 +1634,12 @@ class Linker {
        public function titleAttrib( $name, $options = null ) {
                wfProfileIn( __METHOD__ );
 
-               if ( wfEmptyMsg( "tooltip-$name" ) ) {
+               $message = wfMessage( "tooltip-$name" );
+
+               if ( !$message->exists() ) {
                        $tooltip = false;
                } else {
-                       $tooltip = wfMsg( "tooltip-$name" );
+                       $tooltip = $message->text();
                        # Compatibility: formerly some tooltips had [alt-.] hardcoded
                        $tooltip = preg_replace( "/ ?\[alt-.\]$/", '', $tooltip );
                        # Message equal to '-' means suppress it.