(bug 40660) Don't mangle   in on-wiki JS.
authorCatrope <roan.kattouw@gmail.com>
Tue, 2 Oct 2012 03:21:31 +0000 (20:21 -0700)
committerTimo Tijhof <ttijhof@wikimedia.org>
Sat, 6 Oct 2012 09:07:50 +0000 (11:07 +0200)
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
includes/resourceloader/ResourceLoaderWikiModule.php

index 69fdb30..c168f77 100644 (file)
@@ -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 "&nbsp;" 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.
index 0f09fc3..ee8dd1e 100644 (file)
@@ -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;
                }