From 690b0e131f37093a9b3b3270af84e6eec665ed03 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niklas=20Laxstr=C3=B6m?= Date: Sat, 25 Dec 2010 12:33:17 +0000 Subject: [PATCH] Same for the tooltip, don't call twice --- includes/Linker.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/includes/Linker.php b/includes/Linker.php index fb1d7f16b2..0a22ad70e1 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -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. -- 2.20.1