Index: trunk/extensions/SemanticForms/specials/SF_RunQuery.php |
— | — | @@ -130,7 +130,16 @@ |
131 | 131 | if ( $embedded ) { |
132 | 132 | $wgParser->getOutput()->addHeadItem( $script ); |
133 | 133 | } 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 | + } |
135 | 144 | } |
136 | 145 | } |
137 | 146 | } |