r80994 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r80993‎ | r80994 | r80995 >
Date:21:29, 25 January 2011
Author:foxtrott
Status:deferred
Tags:
Comment:
followup r80990: include modules registered with ResourceLoader, too
Modified paths:
  • /trunk/extensions/SemanticForms/specials/SF_RunQuery.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/specials/SF_RunQuery.php
@@ -130,7 +130,16 @@
131131 if ( $embedded ) {
132132 $wgParser->getOutput()->addHeadItem( $script );
133133 } else {
134 - $wgOut->addScript( $script . implode($wgParser->getOutput()->getHeadItems()) );
 134+ // method was added in MW 1.16
 135+ if ( method_exists( $wgParser->getOutput(), 'getHeadItems' ) ) {
 136+ $wgOut->addScript( $script . implode($wgParser->getOutput()->getHeadItems() ) );
 137+ } else {
 138+ $wgOut->addScript( $script . implode($wgParser->getOutput()->mHeadItems ) );
 139+ }
 140+ // include modules registered with the ResourceLoader
 141+ if ( defined( 'MW_SUPPORTS_RESOURCE_MODULES' ) ) {
 142+ $wgOut->addModules( $wgParser->getOutput()->getModules() );
 143+ }
135144 }
136145 }
137146 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r80990bugfixes...foxtrott21:03, 25 January 2011