From: Roan Kattouw Date: Tue, 2 Aug 2011 16:00:42 +0000 (+0000) Subject: In ResourceLoaderWikiModule, use isCssOrJsPage() as well as isCssJsSubpage() to check... X-Git-Tag: 1.31.0-rc.0~28484 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=883d40949af8ac6b45dd5bf9b21c5807c2adb500;p=lhc%2Fweb%2Fwiklou.git In ResourceLoaderWikiModule, use isCssOrJsPage() as well as isCssJsSubpage() to check whether a wiki page is a CSS or JS page. This is required to make ResourceLoaderWikiModule work for pages that are CSS/JS pages, but don't live in the MediaWiki namespace and aren't user subpages. This wasn't possible before r93759, which introduced a hook that allows extensions to override which pages are considered to be CSS/JS pages. --- diff --git a/includes/resourceloader/ResourceLoaderWikiModule.php b/includes/resourceloader/ResourceLoaderWikiModule.php index c9e7e56ed3..d34548bb7b 100644 --- a/includes/resourceloader/ResourceLoaderWikiModule.php +++ b/includes/resourceloader/ResourceLoaderWikiModule.php @@ -68,7 +68,7 @@ abstract class ResourceLoaderWikiModule extends ResourceLoaderModule { $message = wfMessage( $title->getDBkey() )->inContentLanguage(); return $message->exists() ? $message->plain() : ''; } - if ( !$title->isCssJsSubpage() ) { + if ( !$title->isCssJsSubpage() && !$title->isCssOrJsPage() ) { return null; } $revision = Revision::newFromTitle( $title );