r77402 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77401‎ | r77402 | r77403 >
Date:22:20, 28 November 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Fixed script loading issue with #info on special pages
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/parserhooks/SMW_Info.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/parserhooks/SMW_Info.php
@@ -29,7 +29,16 @@
3030 $content = array_shift( $params ); // Use only first parameter, ignore the rest (may get meaning later).
3131 $result = smwfEncodeMessages( array( $content ), 'info' );
3232
33 - SMWOutputs::commitToParser( $parser );
 33+ // Starting from MW 1.16, there is a more suited method available: Title::isSpecialPage
 34+ global $wgTitle;
 35+ if ( $wgTitle->getNamespace() == NS_SPECIAL ) {
 36+ global $wgOut;
 37+ SMWOutputs::commitToOutputPage( $wgOut );
 38+ }
 39+ else {
 40+ SMWOutputs::commitToParser( $parser );
 41+ }
 42+
3443 return $result;
3544 }
3645

Follow-up revisions

RevisionCommit summaryAuthorDate
r77403Follow up to r77402 - applying similar change to the other parser hooks. Alth...jeroendedauw22:26, 28 November 2010

Status & tagging log