Index: trunk/extensions/SemanticMediaWiki/includes/SMW_Outputs.php |
— | — | @@ -185,7 +185,7 @@ |
186 | 186 | } |
187 | 187 | |
188 | 188 | // Check if the resource loader can be used or not. |
189 | | - if ( method_exists( 'OutputPage', 'addModules' ) ) { |
| 189 | + if ( method_exists( $parserOutput, 'addModules' ) ) { |
190 | 190 | $parserOutput->addModules( array_values( self::$resourceModules ) ); |
191 | 191 | } |
192 | 192 | |
— | — | @@ -208,6 +208,12 @@ |
209 | 209 | $output->addHeadItem( $key, "\t\t" . $item . "\n" ); |
210 | 210 | } |
211 | 211 | |
| 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(); |
212 | 218 | self::$mHeadItems = array(); |
213 | 219 | } |
214 | 220 | |