r68433 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r68432‎ | r68433 | r68434 >
Date:23:05, 22 June 2010
Author:yaron
Status:deferred
Tags:
Comment:
Added handling of 'head items' for generated template call
Modified paths:
  • /trunk/extensions/SemanticForms/specials/SF_RunQuery.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/specials/SF_RunQuery.php
@@ -78,10 +78,14 @@
7979 $wgOut->setPageTitle( $form_page_title );
8080 }
8181 if ( $form_submitted ) {
82 - global $wgUser, $wgTitle;
 82+ global $wgUser, $wgTitle, $wgOut;
8383 $wgParser->mOptions = new ParserOptions();
8484 $wgParser->mOptions->initialiseFromUser( $wgUser );
8585 $text = $wgParser->parse( $data_text, $wgTitle, $wgParser->mOptions )->getText();
 86+ foreach ( $wgParser->getOutput()->getHeadItems() as $key => $item ) {
 87+ $wgOut->addHeadItem( $key, "\t\t" . $item . "\n" );
 88+ }
 89+
8690 $additional_query = wfMsg( 'sf_runquery_additionalquery' );
8791 if ( !$raw )
8892 $text .= "\n<h2>$additional_query</h2>\n";

Status & tagging log