r37612 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r37611‎ | r37612 | r37613 >
Date:13:27, 13 July 2008
Author:nikerabbit
Status:old
Tags:
Comment:
* Bug fixes for the previous commmit
Modified paths:
  • /trunk/extensions/Translate/Stats.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/Stats.php
@@ -113,9 +113,6 @@
114114 }
115115
116116 $labels = null;
117 - if ( $opts['type'] === 'userlang' ) {
118 - $labels = @array_keys($usercache);
119 - }
120117 $so->labels( $labels );
121118
122119 //var_dump( $data );
@@ -229,7 +226,7 @@
230227 public function indexOf( $row ) {
231228 global $wgContLang;
232229
233 - if ( max($this->filters) === 0 ) return 0;
 230+ if ( !max($this->filters) ) return 0;
234231 if ( strpos( $row->rc_title, '/' ) === false ) return -1;
235232
236233 list( $key, $code ) = explode('/', $wgContLang->lcfirst($row->rc_title), 2);
@@ -248,8 +245,7 @@
249246 $indexKey .= $code;
250247 }
251248
252 -
253 - if ( count($this->cache) > 1 ) {
 249+ if ( count($this->cache) ) {
254250 return isset($this->cache[$indexKey]) ? $this->cache[$indexKey] : -1;
255251 } else {
256252 return 0;

Status & tagging log