r102005 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r102004‎ | r102005 | r102006 >
Date:16:12, 4 November 2011
Author:nikerabbit
Status:ok
Tags:
Comment:
Add global which was undefined, simplify the checks which causes wrong codepath to be taken too
Modified paths:
  • /trunk/extensions/Translate/Translate.php (modified) (history)
  • /trunk/extensions/Translate/specials/SpecialMessageGroupStats.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/Translate.php
@@ -510,7 +510,12 @@
511511 */
512512 $wgTranslateGroupFiles = array();
513513
 514+/**
 515+ * @todo document
 516+ */
 517+$wgTranslateWorkflowStates = false;
514518
 519+
515520 # === System setup related configuration ===
516521
517522 /**
Index: trunk/extensions/Translate/specials/SpecialMessageGroupStats.php
@@ -108,7 +108,7 @@
109109 $table = $this->table;
110110
111111 global $wgTranslateWorkflowStates;
112 - if ( $wgTranslateWorkflowStates !== false ) {
 112+ if ( $wgTranslateWorkflowStates ) {
113113 $this->states = self::getWorkflowStates( $this->target );
114114 $this->statemap = array_flip( $wgTranslateWorkflowStates );
115115 $table->addExtraColumn( wfMessage( 'translate-stats-workflow' ) );
@@ -179,7 +179,7 @@
180180 $out .= "\n\t\t" . $this->getMainColumnCell( $code, $extra );
181181 $out .= $this->table->makeNumberColumns( $fuzzy, $translated, $total );
182182 global $wgTranslateWorkflowStates;
183 - if ( $wgTranslateWorkflowStates !== false ) {
 183+ if ( $wgTranslateWorkflowStates ) {
184184 $state = isset( $this->states[$code] ) ? $this->states[$code] : '';
185185 $sort = isset( $this->statemap[$state] ) ? $this->statemap[$state] + 1 : -1;
186186 $out .= "\n\t\t" . $this->table->element( $state, false, $sort );

Status & tagging log