From 27380a80299bf0971342fa4237c6f948b7142984 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Wed, 25 May 2011 18:56:05 +0000 Subject: [PATCH] * Check existence in correct language * Simplify a bit existence check --- includes/specials/SpecialContributions.php | 4 ++-- languages/LanguageConverter.php | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/includes/specials/SpecialContributions.php b/includes/specials/SpecialContributions.php index afebd4dc2a..6da6f87404 100644 --- a/includes/specials/SpecialContributions.php +++ b/includes/specials/SpecialContributions.php @@ -403,8 +403,8 @@ class SpecialContributions extends SpecialPage { Xml::dateMenu( $this->opts['year'], $this->opts['month'] ) . ' ' . Xml::submitButton( wfMsg( 'sp-contributions-submit' ) ) ) . ' '; - $explain = wfMsgExt( 'sp-contributions-explain', 'parseinline' ); - if( !wfEmptyMsg( 'sp-contributions-explain' ) ) { + $explain = wfMessage( 'sp-contributions-explain' ); + if ( $explain->exists() ) { $f .= "

{$explain}

"; } $f .= Xml::closeElement('fieldset' ) . diff --git a/languages/LanguageConverter.php b/languages/LanguageConverter.php index 1332ae70a5..223336ac2c 100644 --- a/languages/LanguageConverter.php +++ b/languages/LanguageConverter.php @@ -531,9 +531,9 @@ class LanguageConverter { $text = ''; } else { // first let's check if a message has given us a converted name - $nsConvKey = 'conversion-ns' . $index; - if ( !wfEmptyMsg( $nsConvKey ) ) { - $text = wfMsgForContentNoTrans( $nsConvKey ); + $nsConvMsg = wfMessage( 'conversion-ns' . $index )->inContentLanguage(); + if ( $nsConvMsg->exists() ) { + $text = $nsConvMsg->plain(); } else { // the message does not exist, try retrieve it from the current // variant's namespace names. -- 2.20.1