r75930 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r75929‎ | r75930 | r75931 >
Date:14:01, 3 November 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Fixed not adding the resource modules for special pages
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_Outputs.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/SMW_Outputs.php
@@ -185,7 +185,7 @@
186186 }
187187
188188 // Check if the resource loader can be used or not.
189 - if ( method_exists( 'OutputPage', 'addModules' ) ) {
 189+ if ( method_exists( $parserOutput, 'addModules' ) ) {
190190 $parserOutput->addModules( array_values( self::$resourceModules ) );
191191 }
192192
@@ -208,6 +208,12 @@
209209 $output->addHeadItem( $key, "\t\t" . $item . "\n" );
210210 }
211211
 212+ // Check if the resource loader can be used or not.
 213+ if ( method_exists( $output, 'addModules' ) ) {
 214+ $output->addModules( array_values( self::$resourceModules ) );
 215+ }
 216+
 217+ self::$resourceModules = array();
212218 self::$mHeadItems = array();
213219 }
214220

Status & tagging log