r93761 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r93760‎ | r93761 | r93762 >
Date:16:00, 2 August 2011
Author:catrope
Status:ok
Tags:
Comment:
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.
Modified paths:
  • /trunk/phase3/includes/resourceloader/ResourceLoaderWikiModule.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/resourceloader/ResourceLoaderWikiModule.php
@@ -68,7 +68,7 @@
6969 $message = wfMessage( $title->getDBkey() )->inContentLanguage();
7070 return $message->exists() ? $message->plain() : '';
7171 }
72 - if ( !$title->isCssJsSubpage() ) {
 72+ if ( !$title->isCssJsSubpage() && !$title->isCssOrJsPage() ) {
7373 return null;
7474 }
7575 $revision = Revision::newFromTitle( $title );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r93759Introduce a hook so extensions can customize what's considered to be a CSS/JS...catrope15:40, 2 August 2011

Status & tagging log