Index: trunk/extensions/ConditionalShowSection/ConditionalShowSection.php |
— | — | @@ -34,9 +34,8 @@ |
35 | 35 | |
36 | 36 | $wgHooks['ParserFirstCallInit'][] = 'wfConditionalShowSection'; |
37 | 37 | |
38 | | -function wfConditionalShowSection() { |
39 | | - global $wgParser; |
40 | | - $wgParser->setHook( "cshow", "ConditionalShowSection" ); |
| 38 | +function wfConditionalShowSection( $parser ) { |
| 39 | + $parser->setHook( "cshow", "ConditionalShowSection" ); |
41 | 40 | return true; |
42 | 41 | } |
43 | 42 | |
— | — | @@ -102,4 +101,4 @@ |
103 | 102 | } |
104 | 103 | |
105 | 104 | return $output; |
106 | | -} |
\ No newline at end of file |
| 105 | +} |