Index: trunk/extensions/SemanticMediaWiki/includes/parserhooks/SMW_Info.php |
— | — | @@ -29,7 +29,16 @@ |
30 | 30 | $content = array_shift( $params ); // Use only first parameter, ignore the rest (may get meaning later). |
31 | 31 | $result = smwfEncodeMessages( array( $content ), 'info' ); |
32 | 32 | |
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 | + |
34 | 43 | return $result; |
35 | 44 | } |
36 | 45 | |