Index: trunk/extensions/Translate/SpecialTranslationStats.php |
— | — | @@ -10,7 +10,6 @@ |
11 | 11 | public function execute( $par ) { |
12 | 12 | global $wgOut, $wgRequest; |
13 | 13 | |
14 | | - |
15 | 14 | $opts = new FormOptions(); |
16 | 15 | $opts->add( 'graphit', false ); |
17 | 16 | $opts->add( 'preview', false ); |
— | — | @@ -32,7 +31,6 @@ |
33 | 32 | $opts[$key] = $value; |
34 | 33 | } |
35 | 34 | |
36 | | - |
37 | 35 | $opts->validateIntBounds( 'days', 1, 300 ); |
38 | 36 | $opts->validateIntBounds( 'width', 200, 1000 ); |
39 | 37 | $opts->validateIntBounds( 'height', 200, 1000 ); |
— | — | @@ -114,7 +112,7 @@ |
115 | 113 | } |
116 | 114 | |
117 | 115 | if ( $spiParams !== '' ) $spiParams = '/' . $spiParams; |
118 | | - |
| 116 | + |
119 | 117 | $titleText = $this->getTitle()->getPrefixedText(); |
120 | 118 | |
121 | 119 | $wgOut->addHTML( |
— | — | @@ -126,7 +124,6 @@ |
127 | 125 | '<hr />' . |
128 | 126 | Xml::tags( 'div', array( 'style' => 'margin: 1em auto; text-align: center;' ), $this->image( $opts ) ) |
129 | 127 | ); |
130 | | - |
131 | 128 | } |
132 | 129 | |
133 | 130 | protected function eInput( $name, FormOptions $opts ) { |
— | — | @@ -262,7 +259,6 @@ |
263 | 260 | |
264 | 261 | $so = new TranslatePerLanguageStats( $opts ); |
265 | 262 | |
266 | | - |
267 | 263 | $tables = array( 'recentchanges' ); |
268 | 264 | $fields = array( 'rc_timestamp' ); |
269 | 265 | |
— | — | @@ -310,7 +306,6 @@ |
311 | 307 | $so->labels( $labels ); |
312 | 308 | |
313 | 309 | return array( $labels, $data ); |
314 | | - |
315 | 310 | } |
316 | 311 | |
317 | 312 | public function draw( FormOptions $opts ) { |
— | — | @@ -372,12 +367,9 @@ |
373 | 368 | |
374 | 369 | // Draw it |
375 | 370 | $plot->DrawGraph(); |
376 | | - |
377 | 371 | } |
378 | | - |
379 | 372 | } |
380 | 373 | |
381 | | - |
382 | 374 | class TranslatePerLanguageStats { |
383 | 375 | protected $opts; |
384 | 376 | protected $cache; |
— | — | @@ -399,6 +391,7 @@ |
400 | 392 | $filters['group'] = trim( $this->opts['group'] ) !== ''; |
401 | 393 | |
402 | 394 | foreach ( $groups as $group ) { |
| 395 | + |
403 | 396 | foreach ( $codes as $code ) { |
404 | 397 | if ( $code !== '' ) $key = "$group ($code)"; |
405 | 398 | else $key = $group; |
— | — | @@ -422,7 +415,6 @@ |
423 | 416 | $type .= '-perlang'; |
424 | 417 | |
425 | 418 | $this->filters = $filters; |
426 | | - |
427 | 419 | } |
428 | 420 | |
429 | 421 | public function postQuery( $rows ) { } |
— | — | @@ -431,7 +423,6 @@ |
432 | 424 | $initial = array_pad( array(), max( 1, count( $this->cache ) ), 0 ); |
433 | 425 | } |
434 | 426 | |
435 | | - |
436 | 427 | public function indexOf( $row ) { |
437 | 428 | global $wgContLang; |
438 | 429 | |
— | — | @@ -475,5 +466,4 @@ |
476 | 467 | $labels = array_keys( $this->cache ); |
477 | 468 | } |
478 | 469 | } |
479 | | - |
480 | 470 | } |
\ No newline at end of file |