Remove use of deprecated LanguageGetMagic hook.
Add FIXME for FlaggedRevs, because it loads the i18n resources in a weird way. Some misc. whitespace updates.
This commit is contained in:
parent
9c4d70071a
commit
46c3376f41
2 changed files with 13 additions and 8 deletions
11
ContributionScores.i18n.magic.php
Normal file
11
ContributionScores.i18n.magic.php
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Magic words for extension.
|
||||||
|
*/
|
||||||
|
|
||||||
|
$magicWords = array();
|
||||||
|
|
||||||
|
/** English (English) */
|
||||||
|
$magicWords['en'] = array(
|
||||||
|
'cscore' => array( 0, 'cscore' ),
|
||||||
|
);
|
|
@ -15,7 +15,7 @@ $wgExtensionCredits['specialpage'][] = array(
|
||||||
'url' => 'https://www.mediawiki.org/wiki/Extension:Contribution_Scores',
|
'url' => 'https://www.mediawiki.org/wiki/Extension:Contribution_Scores',
|
||||||
'author' => 'Tim Laqua',
|
'author' => 'Tim Laqua',
|
||||||
'descriptionmsg' => 'contributionscores-desc',
|
'descriptionmsg' => 'contributionscores-desc',
|
||||||
'version' => '1.14'
|
'version' => '1.15'
|
||||||
);
|
);
|
||||||
|
|
||||||
$dir = dirname( __FILE__ ) . '/';
|
$dir = dirname( __FILE__ ) . '/';
|
||||||
|
@ -35,8 +35,7 @@ $wgSpecialPageGroups['ContributionScores'] = 'wiki';
|
||||||
|
|
||||||
$wgExtensionMessagesFiles['ContributionScores'] = $dir . 'ContributionScores.i18n.php';
|
$wgExtensionMessagesFiles['ContributionScores'] = $dir . 'ContributionScores.i18n.php';
|
||||||
$wgExtensionMessagesFiles['ContributionScoresAlias'] = $dir . 'ContributionScores.alias.php';
|
$wgExtensionMessagesFiles['ContributionScoresAlias'] = $dir . 'ContributionScores.alias.php';
|
||||||
|
$wgExtensionMessagesFiles['ContributionScoresMagic'] = $dir . 'ContributionScores.i18n.magic.php';
|
||||||
$wgHooks['LanguageGetMagic'][] = 'efContributionScores_LanguageGetMagic';
|
|
||||||
|
|
||||||
$wgHooks['ParserFirstCallInit'][] = 'efContributionScores_Setup';
|
$wgHooks['ParserFirstCallInit'][] = 'efContributionScores_Setup';
|
||||||
|
|
||||||
|
@ -45,11 +44,6 @@ function efContributionScores_Setup( &$parser ) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function efContributionScores_LanguageGetMagic( &$magicWords, $langCode ) {
|
|
||||||
$magicWords['cscore'] = array( 0, 'cscore' );
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
function efContributionScores_Render( &$parser, $usertext, $metric = 'score' ) {
|
function efContributionScores_Render( &$parser, $usertext, $metric = 'score' ) {
|
||||||
global $wgContribScoreDisableCache;
|
global $wgContribScoreDisableCache;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue