From 4a32d9c41982b98e430437ffb645a12dced4900f Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Thu, 26 Apr 2012 19:23:02 +0200 Subject: [PATCH] Changed wfMessage() usage to call directly MessageCache::get() so that its $isFullKey parameter can be set to true. The $isFullKey parameter means the message key already contains the language subpage ("/de", etc.) Change-Id: I9bcc93563a2a2f8c38c98e50e18067e70f6fb3d7 --- includes/resourceloader/ResourceLoaderWikiModule.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/includes/resourceloader/ResourceLoaderWikiModule.php b/includes/resourceloader/ResourceLoaderWikiModule.php index 91a51f896c..8dddb5bcc5 100644 --- a/includes/resourceloader/ResourceLoaderWikiModule.php +++ b/includes/resourceloader/ResourceLoaderWikiModule.php @@ -70,8 +70,10 @@ abstract class ResourceLoaderWikiModule extends ResourceLoaderModule { */ protected function getContent( $title ) { if ( $title->getNamespace() === NS_MEDIAWIKI ) { - $message = wfMessage( $title->getDBkey() )->inContentLanguage(); - return $message->exists() ? $message->plain() : ''; + // The first "true" is to use the database, the second is to use the content langue + // and the last one is to specify the message key already contains the language in it ("/de", etc.) + $text = MessageCache::singleton()->get( $title->getDBkey(), true, true, true ); + return $text === false ? '' : $text; } if ( !$title->isCssJsSubpage() && !$title->isCssOrJsPage() ) { return null; -- 2.20.1