From 13be0882667112a359eccd6300812a959bdf8b37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20Laxstr=C3=B6m?= Date: Thu, 20 Dec 2007 22:37:18 +0000 Subject: [PATCH] * Proper escaping, some whitespace --- ContributionScores_body.php | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/ContributionScores_body.php b/ContributionScores_body.php index 51ff779..fa0b02f 100644 --- a/ContributionScores_body.php +++ b/ContributionScores_body.php @@ -36,7 +36,7 @@ class ContributionScores extends IncludableSpecialPage $opts = explode(',', strtolower($options)); - $dbr =& wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_SLAVE ); $userTable = $dbr->tableName('user'); $userGroupTable = $dbr->tableName('user_groups'); @@ -92,10 +92,10 @@ class ContributionScores extends IncludableSpecialPage $output = "\n". "\n". - "\n" . - "\n" . - "\n" . - "\n"; + "\n" . + "\n" . + "\n" . + "\n"; $skin =& $wgUser->getSkin(); $altrow = ''; @@ -106,7 +106,7 @@ class ContributionScores extends IncludableSpecialPage $row->rev_count . "\n
" . wfMsg( 'contributionscores-score' ) . "" . wfMsg( 'contributionscores-pages' ) . "" . wfMsg( 'contributionscores-changes' ) . "" . wfMsg( 'contributionscores-username' ) . "" . wfMsgHtml( 'contributionscores-score' ) . "" . wfMsgHtml( 'contributionscores-pages' ) . "" . wfMsgHtml( 'contributionscores-changes' ) . "" . wfMsgHtml( 'contributionscores-username' ) . "" . $skin->userLink( $row->user_id, $row->user_name ); - # Option to not display user tools + # Option to not display user tools if ( !in_array( 'notools', $opts ) ) $output .= $skin->userToolLinks( $row->user_id, $row->user_name ); @@ -150,6 +150,7 @@ class ContributionScores extends IncludableSpecialPage } return true; } + function showInclude( $par ) { global $wgOut; @@ -180,7 +181,7 @@ class ContributionScores extends IncludableSpecialPage $reportTitle = wfMsg( 'contributionscores-allrevisions' ); } $reportTitle .= " " . wfMsg( 'contributionscores-top', $limit ); - $title = "

$reportTitle

\n"; + $title = Xml::element( 'h4', array( 'class' => 'contributionscores-title' ), $reportTitle ) . "\n"; $wgOut->addHtml( $this->genContributionScoreTable( $days, $limit, $title, $options ) ); } @@ -194,17 +195,18 @@ class ContributionScores extends IncludableSpecialPage array(0,50)); } - $wgOut->addWikiText (wfMsg('contributionscores-info')); + $wgOut->addWikiText( wfMsg( 'contributionscores-info' ) ); foreach ( $contribScoreReports as $scoreReport) { if ( $scoreReport[0] > 0 ) { - $reportTitle = wfMsg('contributionscores-days', $scoreReport[0]); + $reportTitle = wfMsg( 'contributionscores-days', $scoreReport[0] ); } else { - $reportTitle = wfMsg('contributionscores-allrevisions'); + $reportTitle = wfMsg( 'contributionscores-allrevisions' ); } - $reportTitle .= " " . wfMsg('contributionscores-top', $scoreReport[1]); - $wgOut->addHtml ("

$reportTitle

\n"); - $wgOut->addHtml( $this->genContributionScoreTable($scoreReport[0],$scoreReport[1])); + $reportTitle .= " " . wfMsg('contributionscores-top', $scoreReport[1] ); + $title = Xml::element( 'h2', array( 'class' => 'contributionscores-title' ), $reportTitle ) . "\n"; + $wgOut->addHtml( $title ); + $wgOut->addHtml( $this->genContributionScoreTable( $scoreReport[0], $scoreReport[1] ) ); } } }