r72178 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r72177‎ | r72178 | r72179 >
Date:23:21, 1 September 2010
Author:siebrand
Status:deferred
Tags:
Comment:
Update documentation and fix an 'undefined index groups' when run without any arguments.
Modified paths:
  • /trunk/extensions/Translate/scripts/groupStatistics.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/scripts/groupStatistics.php
@@ -86,7 +86,9 @@
8787 * group in the sum of the values for all the groups in the array.
8888 *
8989 * Definitions in this variable can be used to report weighted meta localisation
90 - * scores.
 90+ * scores for the 50 most spoken languages.
 91+ *
 92+ * @todo Allow weighted reporting for all available languges.
9193 */
9294 $localisedWeights = array(
9395 'wikimedia' => array(
@@ -177,7 +179,9 @@
178180 require( dirname( __FILE__ ) . '/cli.inc' );
179181
180182 /**
181 - * @todo Needs documentation.
 183+ * Provides heading, summaryheading and free text addition for stats output in
 184+ * wiki format.
 185+ *
182186 * @ingroup Stats
183187 */
184188 class TranslateStatsOutput extends wikiStatsOutput {
@@ -201,6 +205,8 @@
202206 // Show help and exit if '--most' does not have a valid value and no groups set
203207 if ( isset( $options['most'] ) && !isset( $localisedWeights[$options['most']] ) && !isset( $options['groups'] ) ) {
204208 showUsage();
 209+} elseif ( !isset( $options['most'] ) && !isset( $options['groups'] ) ) {
 210+ showUsage();
205211 }
206212
207213 if ( !isset( $options['output'] ) ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r73269Partial revert of r72178. This broke --wmfscore as reported by Erik Zachte.siebrand08:00, 18 September 2010

Status & tagging log