diff --git a/ContributionScores.php b/ContributionScores.php index 93ad076..dac29ce 100644 --- a/ContributionScores.php +++ b/ContributionScores.php @@ -42,11 +42,7 @@ if( version_compare( $wgVersion, '1.13', '>=' ) ) { $wgHooks['LanguageGetMagic'][] = 'efContributionScores_LanguageGetMagic'; -if ( defined( 'MW_SUPPORTS_PARSERFIRSTCALLINIT' ) ) { - $wgHooks['ParserFirstCallInit'][] = 'efContributionScores_Setup'; -} else { - $wgExtensionFunctions[] = 'efContributionScores_Setup'; -} +$wgHooks['ParserFirstCallInit'][] = 'efContributionScores_Setup'; ///Message Cache population for versions that did not support $wgExtensionFunctions function efContributionScores_AddMessages() { @@ -60,10 +56,8 @@ function efContributionScores_AddMessages() { return true; } -function efContributionScores_Setup() { - global $wgParser; - - $wgParser->setFunctionHook( 'cscore', 'efContributionScores_Render' ); +function efContributionScores_Setup( &$parser ) { + $parser->setFunctionHook( 'cscore', 'efContributionScores_Render' ); return true; }