r19885 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r19884‎ | r19885 | r19886 >
Date:15:57, 11 February 2007
Author:mkroetzsch
Status:old
Tags:
Comment:
Register IQ hook in global functions, use OT_HTML for template expansion in inline queries.
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_GlobalFunctions.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_InlineQueries.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/SMW_GlobalFunctions.php
@@ -91,6 +91,7 @@
9292 $wgHooks['ArticleDelete'][] = 'smwfDeleteHook';
9393 $wgHooks['TitleMoveComplete'][]='smwfMoveHook';
9494 $wgHooks['BeforePageDisplay'][]='smwfAddHTMLHeader';
 95+ $wgHooks['ParserBeforeStrip'][] = 'smwfRegisterInlineQueries'; // a hook for registering the <ask> parser hook
9596
9697 /**********************************************/
9798 /***** credits (see "Special:Version") *****/
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_InlineQueries.php
@@ -85,8 +85,8 @@
8686 $smwgIQSortingEnabled = true;
8787
8888 // first, we register a hook that will register a hook in the parser
89 -global $wgHooks;
90 -$wgHooks['ParserBeforeStrip'][] = 'smwfRegisterInlineQueries';
 89+// global $wgHooks;
 90+// $wgHooks['ParserBeforeStrip'][] = 'smwfRegisterInlineQueries';
9191
9292 // This hook registers a hook in the parser
9393 function smwfRegisterInlineQueries( $semantic, $mediawiki, $rules ) {
@@ -467,7 +467,7 @@
468468 $parser = new Parser();
469469 $parserOptions = new ParserOptions();
470470 //$parserOptions->setInterfaceMessage( true );
471 - $parser->startExternalParse( $wgTitle, $parserOptions, OT_MSG );
 471+ $parser->startExternalParse( $wgTitle, $parserOptions, OT_HTML );
472472 $text = $parser->transformMsg( $text, $parserOptions );
473473
474474 $this->dbr =& wfGetDB( DB_SLAVE ); // Note: if this fails, there were worse errors before; don't check it

Status & tagging log