From a6f0f56188e39647de6fee4677f56274127a001f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niklas=20Laxstr=C3=B6m?= Date: Thu, 15 Apr 2010 12:41:19 +0000 Subject: [PATCH] Some cleanups --- includes/specials/SpecialStatistics.php | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/includes/specials/SpecialStatistics.php b/includes/specials/SpecialStatistics.php index 2e785b8b68..60b98d3acb 100644 --- a/includes/specials/SpecialStatistics.php +++ b/includes/specials/SpecialStatistics.php @@ -9,9 +9,7 @@ */ /** - * Show the special page - * - * @param mixed $par (not used) + * Some statistics about the wiki */ class SpecialStatistics extends SpecialPage { @@ -25,7 +23,6 @@ class SpecialStatistics extends SpecialPage { public function execute( $par ) { global $wgOut, $wgRequest, $wgMessageCache, $wgMemc; global $wgDisableCounters, $wgMiserMode; - $wgMessageCache->loadAllMessages(); $this->setHeaders(); @@ -101,11 +98,11 @@ class SpecialStatistics extends SpecialPage { /** * Format a row - * @param string $text description of the row - * @param float $number a number - * @param array $trExtraParams - * @param string $descMsg - * @param string $descMsgParam + * @param $text String: description of the row + * @param $number Float: a statistical number + * @param $trExtraParams Array: params to table row, see Html::elememt + * @param $descMsg String: message key + * @param $descMsgParam Array: message params * @return string table row in HTML format */ private function formatRow( $text, $number, $trExtraParams = array(), $descMsg = '', $descMsgParam = '' ) { @@ -118,10 +115,11 @@ class SpecialStatistics extends SpecialPage { $descriptionText ); } } - return Xml::openElement( 'tr', $trExtraParams ) . - Xml::openElement( 'td' ) . $text . Xml::closeElement( 'td' ) . - Xml::openElement( 'td', array( 'class' => 'mw-statistics-numbers' ) ) . $number . Xml::closeElement( 'td' ) . - Xml::closeElement( 'tr' ); + return + Html::rawElement( 'tr', $trExtraParams, + Html::rawElement( 'td', array(), $text ) . + Html::rawElement( 'td', array( 'class' => 'mw-statistics-numbers' ), $number ) + ); } /** -- 2.20.1