r59026 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r59025‎ | r59026 | r59027 >
Date:21:09, 13 November 2009
Author:siebrand
Status:deferred
Tags:
Comment:
Follow-up r59025. Something about "Using $this when not in object context".
Modified paths:
  • /trunk/extensions/Translate/utils/MessageIndexRebuilder.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/utils/MessageIndexRebuilder.php
@@ -13,8 +13,6 @@
1414 */
1515
1616 class MessageIndexRebuilder {
17 - protected $reportProgress;
18 -
1917 public static function execute( $reportProgress = true ) {
2018 $groups = MessageGroups::singleton()->getGroups();
2119
@@ -23,7 +21,6 @@
2422
2523 if( $reportProgress ) {
2624 STDOUT( "Working with ", 'main' );
27 - $this->reportProgress = true;
2825 }
2926
3027 foreach ( $groups as $g ) {
@@ -34,11 +31,11 @@
3532 continue;
3633 }
3734
38 - self::checkAndAdd( $hugearray, $g );
 35+ self::checkAndAdd( $hugearray, $g, false, $reportProgress );
3936 }
4037
4138 foreach ( $postponed as $g ) {
42 - self::checkAndAdd( $hugearray, $g, true );
 39+ self::checkAndAdd( $hugearray, $g, true, $reportProgress );
4340 }
4441
4542 global $wgCacheDirectory;
@@ -48,7 +45,7 @@
4946 $writer->close();
5047 }
5148
52 - protected static function checkAndAdd( &$hugearray, $g, $ignore = false ) {
 49+ protected static function checkAndAdd( &$hugearray, $g, $ignore = false, $reportProgress = true ) {
5350 if ( $g instanceof MessageGroupBase ) {
5451 $cache = new MessageGroupCache( $g );
5552 if ( $cache->exists() ) {
@@ -64,7 +61,7 @@
6562
6663 $id = $g->getId();
6764
68 - if( $this->reportProgress ) {
 65+ if( $reportProgress ) {
6966 STDOUT( "$id ", 'main' );
7067 }
7168

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r59025Allow suppression of progress reportsiebrand21:05, 13 November 2009

Status & tagging log