Unbreaking stuff that previous commit broke
This commit is contained in:
parent
86c3ce39b1
commit
1cd4e250f9
3 changed files with 6 additions and 7 deletions
|
@ -5,7 +5,6 @@
|
|||
*
|
||||
* @addtogroup Extensions
|
||||
*/
|
||||
echo "ding";
|
||||
|
||||
$messages = array();
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ define( 'CONTRIBUTIONSCORES_MAXINCLUDELIMIT', 50 );
|
|||
$wgContribScoreReports = null;
|
||||
$wgContribScoreIgnoreBlockedUsers = false;
|
||||
$wgContribScoreIgnoreBots = false;
|
||||
$wgContributionScoresDisableCache = false;
|
||||
$wgContribScoreDisableCache = false;
|
||||
|
||||
$wgAutoloadClasses['ContributionScores'] = CONTRIBUTIONSCORES_PATH . '/ContributionScores_body.php';
|
||||
$wgSpecialPages['ContributionScores'] = 'ContributionScores';
|
||||
|
@ -63,14 +63,14 @@ function efContributionScores_LanguageGetMagic( &$magicWords, $langCode ) {
|
|||
}
|
||||
|
||||
function efContributionScores_Render(&$parser, $usertext, $metric='score') {
|
||||
global $wgContributionScoresDisableCache, $wgVersion;
|
||||
global $wgContribScoreDisableCache, $wgVersion;
|
||||
|
||||
if( version_compare( $wgVersion, '1.11', '>=' ) )
|
||||
wfLoadExtensionMessages( 'ContributionScores' );
|
||||
|
||||
$output = "";
|
||||
|
||||
if ($wgContributionScoresDisableCache) {
|
||||
if ($wgContribScoreDisableCache) {
|
||||
$parser->disableCache();
|
||||
}
|
||||
|
||||
|
@ -83,7 +83,7 @@ function efContributionScores_Render(&$parser, $usertext, $metric='score') {
|
|||
'COUNT(DISTINCT rev_page)+SQRT(COUNT(rev_id)-COUNT(DISTINCT rev_page))*2 AS wiki_rank',
|
||||
array('rev_user' => $user->getID()));
|
||||
$row = $dbr->fetchObject($res);
|
||||
$output = $row->wiki_rank;
|
||||
$output = round($row->wiki_rank,0);
|
||||
} elseif ($metric=='changes') {
|
||||
$res = $dbr->select('revision',
|
||||
'COUNT(rev_id) AS rev_count',
|
||||
|
|
|
@ -154,9 +154,9 @@ class ContributionScores extends IncludableSpecialPage
|
|||
}
|
||||
|
||||
function showInclude( $par ) {
|
||||
global $wgOut, $wgContributionScoresDisableCache;
|
||||
global $wgOut, $wgContribScoreDisableCache;
|
||||
|
||||
if($wgContributionScoresDisableCache) {
|
||||
if($wgContribScoreDisableCache) {
|
||||
global $wgParser;
|
||||
$wgParser->disableCache();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue