diff --git a/ContributionScores.php b/ContributionScores.php index 7555cae..0664976 100644 --- a/ContributionScores.php +++ b/ContributionScores.php @@ -24,7 +24,6 @@ $contribScoreReports = null; $wgAutoloadClasses['ContributionScores'] = CONTRIBUTIONSCORES_PATH . '/ContributionScores_body.php'; $wgSpecialPages['ContributionScores'] = 'ContributionScores'; -$wgHooks['BeforePageDisplay'][] = 'efContributionScores_addHeadScripts'; if( version_compare( $wgVersion, '1.11', '>=' ) ) { $wgExtensionMessagesFiles['ContributionScores'] = CONTRIBUTIONSCORES_PATH . '/ContributionScores.i18n.php'; diff --git a/ContributionScores_body.php b/ContributionScores_body.php index d454c65..8ffb09b 100644 --- a/ContributionScores_body.php +++ b/ContributionScores_body.php @@ -107,7 +107,9 @@ class ContributionScores extends IncludableSpecialPage } function execute( $par ) { - global $wgRequest, $wgVersion, $wgOut; + global $wgRequest, $wgVersion, $wgOut, $wgHooks; + + $wgHooks['BeforePageDisplay'][] = 'efContributionScores_addHeadScripts'; if( version_compare( $wgVersion, '1.11', '>=' ) ) wfLoadExtensionMessages( 'ContributionScores' );