Unbreaking stuff that previous commit broke

This commit is contained in:
Tim Laqua 2008-05-16 01:59:42 +00:00
parent 86c3ce39b1
commit 1cd4e250f9
3 changed files with 6 additions and 7 deletions

View file

@ -5,7 +5,6 @@
* *
* @addtogroup Extensions * @addtogroup Extensions
*/ */
echo "ding";
$messages = array(); $messages = array();

View file

@ -24,7 +24,7 @@ define( 'CONTRIBUTIONSCORES_MAXINCLUDELIMIT', 50 );
$wgContribScoreReports = null; $wgContribScoreReports = null;
$wgContribScoreIgnoreBlockedUsers = false; $wgContribScoreIgnoreBlockedUsers = false;
$wgContribScoreIgnoreBots = false; $wgContribScoreIgnoreBots = false;
$wgContributionScoresDisableCache = false; $wgContribScoreDisableCache = false;
$wgAutoloadClasses['ContributionScores'] = CONTRIBUTIONSCORES_PATH . '/ContributionScores_body.php'; $wgAutoloadClasses['ContributionScores'] = CONTRIBUTIONSCORES_PATH . '/ContributionScores_body.php';
$wgSpecialPages['ContributionScores'] = 'ContributionScores'; $wgSpecialPages['ContributionScores'] = 'ContributionScores';
@ -63,14 +63,14 @@ function efContributionScores_LanguageGetMagic( &$magicWords, $langCode ) {
} }
function efContributionScores_Render(&$parser, $usertext, $metric='score') { function efContributionScores_Render(&$parser, $usertext, $metric='score') {
global $wgContributionScoresDisableCache, $wgVersion; global $wgContribScoreDisableCache, $wgVersion;
if( version_compare( $wgVersion, '1.11', '>=' ) ) if( version_compare( $wgVersion, '1.11', '>=' ) )
wfLoadExtensionMessages( 'ContributionScores' ); wfLoadExtensionMessages( 'ContributionScores' );
$output = ""; $output = "";
if ($wgContributionScoresDisableCache) { if ($wgContribScoreDisableCache) {
$parser->disableCache(); $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', 'COUNT(DISTINCT rev_page)+SQRT(COUNT(rev_id)-COUNT(DISTINCT rev_page))*2 AS wiki_rank',
array('rev_user' => $user->getID())); array('rev_user' => $user->getID()));
$row = $dbr->fetchObject($res); $row = $dbr->fetchObject($res);
$output = $row->wiki_rank; $output = round($row->wiki_rank,0);
} elseif ($metric=='changes') { } elseif ($metric=='changes') {
$res = $dbr->select('revision', $res = $dbr->select('revision',
'COUNT(rev_id) AS rev_count', 'COUNT(rev_id) AS rev_count',

View file

@ -154,9 +154,9 @@ class ContributionScores extends IncludableSpecialPage
} }
function showInclude( $par ) { function showInclude( $par ) {
global $wgOut, $wgContributionScoresDisableCache; global $wgOut, $wgContribScoreDisableCache;
if($wgContributionScoresDisableCache) { if($wgContribScoreDisableCache) {
global $wgParser; global $wgParser;
$wgParser->disableCache(); $wgParser->disableCache();
} }