From: Alexandre Emsenhuber Date: Sun, 22 May 2011 08:24:07 +0000 (+0000) Subject: Use wfMessage() so that we can check message existence in content language instead... X-Git-Tag: 1.31.0-rc.0~30017 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=0a7f26f395c9aec0ba40c7223d0a21088da0a14b;p=lhc%2Fweb%2Fwiklou.git Use wfMessage() so that we can check message existence in content language instead of user language --- diff --git a/includes/resourceloader/ResourceLoaderWikiModule.php b/includes/resourceloader/ResourceLoaderWikiModule.php index 8065d69c96..cab97e19fc 100644 --- a/includes/resourceloader/ResourceLoaderWikiModule.php +++ b/includes/resourceloader/ResourceLoaderWikiModule.php @@ -51,8 +51,8 @@ abstract class ResourceLoaderWikiModule extends ResourceLoaderModule { */ protected function getContent( $title ) { if ( $title->getNamespace() === NS_MEDIAWIKI ) { - $dbkey = $title->getDBkey(); - return wfEmptyMsg( $dbkey ) ? '' : wfMsgExt( $dbkey, 'content' ); + $message = wfMessage( $title->getDBkey() )->inContentLanguage(); + return $message->exists() ? $message->plain() : ''; } if ( !$title->isCssJsSubpage() ) { return null;