From 736db146cc110fa0d49d10390de226249740e16a Mon Sep 17 00:00:00 2001 From: Catrope Date: Mon, 1 Oct 2012 20:21:31 -0700 Subject: [PATCH] (bug 40660) Don't mangle   in on-wiki JS. Fixed by no longer using MessageCache::get() in ResourceLoaderWikiModule. The only reason I see for using it is to make default values for .js pages in the MediaWiki: namespace work (by specifying them in an .i18n.php file), but that's evil and no one was doing that other than putting in descriptive comments like /* Site scripts go here */. That, and the previous implementation of MediaWiki namespace JS that RL replaced did it, so I kept it at the time, assuming it must have been needed for some reason. Change-Id: Ica7f35fefcc200f0b3daf1d06d98a0b8ea878f3a --- RELEASE-NOTES-1.20 | 2 ++ includes/resourceloader/ResourceLoaderWikiModule.php | 6 ------ 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/RELEASE-NOTES-1.20 b/RELEASE-NOTES-1.20 index 69fdb30f94..c168f77def 100644 --- a/RELEASE-NOTES-1.20 +++ b/RELEASE-NOTES-1.20 @@ -260,6 +260,8 @@ upgrade PHP if you have not done so prior to upgrading MediaWiki. * (bug 31676) ResourceLoader should work around IE stylesheet limit. * (bug 40498) ResourceLoader should not output an empty "@media print { }" block. * (bug 40500) ResourceLoader should not ignore media-type for urls in debug mode. +* (bug 40660) ResourceLoaderWikiModule should not convert " " to a space + for pages from the MediaWiki-namespace. === API changes in 1.20 === * (bug 34316) Add ability to retrieve maximum upload size from MediaWiki API. diff --git a/includes/resourceloader/ResourceLoaderWikiModule.php b/includes/resourceloader/ResourceLoaderWikiModule.php index 0f09fc3435..ee8dd1e5e7 100644 --- a/includes/resourceloader/ResourceLoaderWikiModule.php +++ b/includes/resourceloader/ResourceLoaderWikiModule.php @@ -68,12 +68,6 @@ abstract class ResourceLoaderWikiModule extends ResourceLoaderModule { * @return null|string */ protected function getContent( $title ) { - if ( $title->getNamespace() === NS_MEDIAWIKI ) { - // 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