Index: trunk/extensions/DoubleWiki/DoubleWiki_body.php |
— | — | @@ -42,6 +42,11 @@ |
43 | 43 | } |
44 | 44 | } |
45 | 45 | |
| 46 | + static function OutputPageBeforeHTML( &$parserOutput , &$text ) { |
| 47 | + $dw = new self(); |
| 48 | + $dw->addMatchedText( $parserOutput, $text ); |
| 49 | + } |
| 50 | + |
46 | 51 | /* |
47 | 52 | * Hook function called with &match=lang |
48 | 53 | * Transform $text into a bilingual version |
Index: trunk/extensions/DoubleWiki/DoubleWiki.php |
— | — | @@ -24,7 +24,7 @@ |
25 | 25 | |
26 | 26 | $wgExtensionMessagesFiles['DoubleWiki'] = dirname(__FILE__) . '/DoubleWiki.i18n.php'; |
27 | 27 | $wgAutoloadClasses['DoubleWiki'] = dirname( __FILE__ ) . "/DoubleWiki_body.php"; |
28 | | -$wgHooks['OutputPageBeforeHTML'][] = array( new DoubleWiki, 'addMatchedText' ); |
| 28 | +$wgHooks['OutputPageBeforeHTML'][] = array( 'DoubleWiki', 'OutputPageBeforeHTML' ); |
29 | 29 | |
30 | 30 | $wgExtensionCredits['other'][] = array( |
31 | 31 | 'path' => __FILE__, |