r65058 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r65057‎ | r65058 | r65059 >
Date:12:41, 15 April 2010
Author:nikerabbit
Status:ok
Tags:
Comment:
Some cleanups
Modified paths:
  • /trunk/phase3/includes/specials/SpecialStatistics.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialStatistics.php
@@ -9,9 +9,7 @@
1010 */
1111
1212 /**
13 - * Show the special page
14 - *
15 - * @param mixed $par (not used)
 13+ * Some statistics about the wiki
1614 */
1715 class SpecialStatistics extends SpecialPage {
1816
@@ -25,7 +23,6 @@
2624 public function execute( $par ) {
2725 global $wgOut, $wgRequest, $wgMessageCache, $wgMemc;
2826 global $wgDisableCounters, $wgMiserMode;
29 - $wgMessageCache->loadAllMessages();
3027
3128 $this->setHeaders();
3229
@@ -101,11 +98,11 @@
10299
103100 /**
104101 * Format a row
105 - * @param string $text description of the row
106 - * @param float $number a number
107 - * @param array $trExtraParams
108 - * @param string $descMsg
109 - * @param string $descMsgParam
 102+ * @param $text String: description of the row
 103+ * @param $number Float: a statistical number
 104+ * @param $trExtraParams Array: params to table row, see Html::elememt
 105+ * @param $descMsg String: message key
 106+ * @param $descMsgParam Array: message params
110107 * @return string table row in HTML format
111108 */
112109 private function formatRow( $text, $number, $trExtraParams = array(), $descMsg = '', $descMsgParam = '' ) {
@@ -118,10 +115,11 @@
119116 $descriptionText );
120117 }
121118 }
122 - return Xml::openElement( 'tr', $trExtraParams ) .
123 - Xml::openElement( 'td' ) . $text . Xml::closeElement( 'td' ) .
124 - Xml::openElement( 'td', array( 'class' => 'mw-statistics-numbers' ) ) . $number . Xml::closeElement( 'td' ) .
125 - Xml::closeElement( 'tr' );
 119+ return
 120+ Html::rawElement( 'tr', $trExtraParams,
 121+ Html::rawElement( 'td', array(), $text ) .
 122+ Html::rawElement( 'td', array( 'class' => 'mw-statistics-numbers' ), $number )
 123+ );
126124 }
127125
128126 /**

Status & tagging log