Index: trunk/extensions/SemanticMediaWiki/includes/parserhooks/SMW_Concept.php |
— | — | @@ -72,7 +72,15 @@ |
73 | 73 | ( $concept_docu ? "<p>$concept_docu</p>" : '' ) . |
74 | 74 | '<pre>' . str_replace( '[', '[', $concept_text ) . "</pre>\n</div>"; |
75 | 75 | |
76 | | - SMWOutputs::commitToParser( $parser ); |
| 76 | + // Starting from MW 1.16, there is a more suited method available: Title::isSpecialPage |
| 77 | + if ( $wgTitle->getNamespace() == NS_SPECIAL ) { |
| 78 | + global $wgOut; |
| 79 | + SMWOutputs::commitToOutputPage( $wgOut ); |
| 80 | + } |
| 81 | + else { |
| 82 | + SMWOutputs::commitToParser( $parser ); |
| 83 | + } |
| 84 | + |
77 | 85 | return $result; |
78 | 86 | } |
79 | 87 | |
Index: trunk/extensions/SemanticMediaWiki/includes/parserhooks/SMW_Set.php |
— | — | @@ -35,7 +35,6 @@ |
36 | 36 | } |
37 | 37 | } |
38 | 38 | |
39 | | - SMWOutputs::commitToParser( $parser ); // not obviously required, but let us be sure |
40 | 39 | return ''; |
41 | 40 | } |
42 | 41 | |
Index: trunk/extensions/SemanticMediaWiki/includes/parserhooks/SMW_SetRecurringEvent.php |
— | — | @@ -40,7 +40,14 @@ |
41 | 41 | SMWParseData::addProperty( $property_name, $date_str, false, $parser, true ); |
42 | 42 | } |
43 | 43 | |
44 | | - SMWOutputs::commitToParser( $parser ); // Not obviously required, but let us be sure. |
| 44 | + // Starting from MW 1.16, there is a more suited method available: Title::isSpecialPage |
| 45 | + if ( $wgTitle->getNamespace() == NS_SPECIAL ) { |
| 46 | + global $wgOut; |
| 47 | + SMWOutputs::commitToOutputPage( $wgOut ); |
| 48 | + } |
| 49 | + else { |
| 50 | + SMWOutputs::commitToParser( $parser ); |
| 51 | + } |
45 | 52 | } |
46 | 53 | |
47 | 54 | /** |
Index: trunk/extensions/SemanticMediaWiki/includes/parserhooks/SMW_Declare.php |
— | — | @@ -74,7 +74,15 @@ |
75 | 75 | // @todo Save as metadata |
76 | 76 | } |
77 | 77 | |
78 | | - SMWOutputs::commitToParser( $parser ); // Not obviously required, but let us be sure. |
| 78 | + // Starting from MW 1.16, there is a more suited method available: Title::isSpecialPage |
| 79 | + if ( $wgTitle->getNamespace() == NS_SPECIAL ) { |
| 80 | + global $wgOut; |
| 81 | + SMWOutputs::commitToOutputPage( $wgOut ); |
| 82 | + } |
| 83 | + else { |
| 84 | + SMWOutputs::commitToParser( $parser ); |
| 85 | + } |
| 86 | + |
79 | 87 | return ''; |
80 | 88 | } |
81 | 89 | |
Index: trunk/extensions/SemanticMediaWiki/includes/parserhooks/SMW_Show.php |
— | — | @@ -37,7 +37,15 @@ |
38 | 38 | $result = smwfEncodeMessages( array( wfMsgForContent( 'smw_iq_disabled' ) ) ); |
39 | 39 | } |
40 | 40 | |
41 | | - SMWOutputs::commitToParser( $parser ); |
| 41 | + // Starting from MW 1.16, there is a more suited method available: Title::isSpecialPage |
| 42 | + if ( $wgTitle->getNamespace() == NS_SPECIAL ) { |
| 43 | + global $wgOut; |
| 44 | + SMWOutputs::commitToOutputPage( $wgOut ); |
| 45 | + } |
| 46 | + else { |
| 47 | + SMWOutputs::commitToParser( $parser ); |
| 48 | + } |
| 49 | + |
42 | 50 | return $result; |
43 | 51 | } |
44 | 52 | |