r79599 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r79598‎ | r79599 | r79600 >
Date:21:14, 4 January 2011
Author:krinkle
Status:deferred
Tags:
Comment:
using different check. (same as in TranslateUtils.php)
Modified paths:
  • /trunk/extensions/Translate/SpecialLanguageStats.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/SpecialLanguageStats.php
@@ -31,7 +31,7 @@
3232 $this->setHeaders();
3333 $this->outputHeader();
3434
35 - if ( MW_SUPPORTS_RESOURCE_MODULES ) {
 35+ if ( class_exists( 'ResourceLoader' ) ) {
3636 $wgOut->addModules( 'ext.translate.langstats' );
3737 }
3838 $wgOut->addExtensionStyle( TranslateUtils::assetPath( 'Translate.css' ) );
@@ -224,6 +224,7 @@
225225 }
226226
227227 protected function makeGroupGroup( $item, $cache, $parent = '' ) {
 228+ $out = '';
228229 if ( !is_array( $item ) ) {
229230 return $this->makeGroupRow( $item, $cache, $parent === '' ? false : $parent );
230231 }
@@ -251,7 +252,7 @@
252253 $blacklisted = $this->isBlacklisted( $groupId, $code );
253254
254255 if ( $blacklisted !== null ) {
255 - return '';
 256+ continue;
256257 }
257258
258259 $fuzzy = $translated = $total = 0;
@@ -270,12 +271,12 @@
271272 if ( $total == 0 ) {
272273 $zero = serialize( $total );
273274 error_log( __METHOD__ . ": Group $groupName has zero message ($code): $zero" );
274 - return '';
 275+ continue;
275276 }
276277
277278 // Skip if $suppressComplete and complete
278279 if ( $suppressComplete && !$fuzzy && $translated === $total ) {
279 - return '';
 280+ continue;
280281 }
281282
282283 if ( $translated === $total ) {

Status & tagging log