From 55eecb664d8affc1b0eb1b51596525f98fadf9d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20Laxstr=C3=B6m?= Date: Fri, 4 Jan 2008 01:40:33 +0000 Subject: [PATCH] * Nothing to optimise here --- ContributionScores.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/ContributionScores.php b/ContributionScores.php index a9e4787..4bc7aa6 100644 --- a/ContributionScores.php +++ b/ContributionScores.php @@ -20,14 +20,12 @@ $wgExtensionCredits['specialpage'][] = array( define( 'CONTRIBUTIONSCORES_PATH', dirname( __FILE__ ) ); define( 'CONTRIBUTIONSCORES_EXTPATH', str_replace( $_SERVER['DOCUMENT_ROOT'], '/', CONTRIBUTIONSCORES_PATH ) ); define( 'CONTRIBUTIONSCORES_MAXINCLUDELIMIT', 50 ); -$wgExtensionMessagesFiles['ContributionScores'] = CONTRIBUTIONSCORES_PATH . 'ContributionScores.i18n.php'; - $contribScoreReports = null; $wgAutoloadClasses['ContributionScores'] = CONTRIBUTIONSCORES_PATH . '/ContributionScores_body.php'; $wgSpecialPages['ContributionScores'] = 'ContributionScores'; -if( version_compare( $wgVersion, '1.11', '>=' ) ) { +if( version_compare( $wgVersion, '1.11', '>=' ) ) { $wgExtensionMessagesFiles['ContributionScores'] = CONTRIBUTIONSCORES_PATH . '/ContributionScores.i18n.php'; } else { $wgExtensionFunctions[] = 'efContributionScores'; @@ -35,11 +33,14 @@ if( version_compare( $wgVersion, '1.11', '>=' ) ) { ///Message Cache population for versions that did not support $wgExtensionFunctions function efContributionScores() { - global $wgMessageCache; + global $wgMessageCache; - #Add Messages - wfLoadExtensionMessages('Contribution Scores'); + #Add Messages + require( CONTRIBUTIONSCORES_PATH . '/ContributionScores.i18n.php' ); + foreach( $messages as $key => $value ) { + $wgMessageCache->addMessages( $messages[$key], $key ); } +} function efContributionScores_addHeadScripts(&$out) { $out->addScript( '' . "\n" );