r84247 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84246‎ | r84247 | r84248 >
Date:14:07, 18 March 2011
Author:ialex
Status:deferred
Tags:
Comment:
ParserFirstCallInit hook has a parameter, so use it
Modified paths:
  • /trunk/extensions/ConditionalShowSection/ConditionalShowSection.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ConditionalShowSection/ConditionalShowSection.php
@@ -34,9 +34,8 @@
3535
3636 $wgHooks['ParserFirstCallInit'][] = 'wfConditionalShowSection';
3737
38 -function wfConditionalShowSection() {
39 - global $wgParser;
40 - $wgParser->setHook( "cshow", "ConditionalShowSection" );
 38+function wfConditionalShowSection( $parser ) {
 39+ $parser->setHook( "cshow", "ConditionalShowSection" );
4140 return true;
4241 }
4342
@@ -102,4 +101,4 @@
103102 }
104103
105104 return $output;
106 -}
\ No newline at end of file
 105+}

Status & tagging log