Index: trunk/extensions/Translate/tag/SpecialPageTranslation.php |
— | — | @@ -380,7 +380,7 @@ |
381 | 381 | |
382 | 382 | if ( $s->type === 'changed' ) { |
383 | 383 | $diff = new DifferenceEngine; |
384 | | - if( method_exists( 'DifferenceEngine', 'setDiffLang' ) ) { |
| 384 | + if ( method_exists( 'DifferenceEngine', 'setDiffLang' ) ) { |
385 | 385 | $diff->setDiffLang( $wgContLang ); |
386 | 386 | } |
387 | 387 | $diff->setText( $s->getOldText(), $s->getText() ); |
— | — | @@ -420,7 +420,7 @@ |
421 | 421 | $wgOut->wrapWikiMsg( '==$1==', 'tpt-sections-template' ); |
422 | 422 | |
423 | 423 | $diff = new DifferenceEngine; |
424 | | - if( method_exists( 'DifferenceEngine', 'setDiffLang' ) ) { |
| 424 | + if ( method_exists( 'DifferenceEngine', 'setDiffLang' ) ) { |
425 | 425 | $diff->setDiffLang( $wgContLang ); |
426 | 426 | } |
427 | 427 | $diff->setText( $oldTemplate, $newTemplate ); |
Index: trunk/extensions/Translate/tag/PageTranslationHooks.php |
— | — | @@ -231,7 +231,7 @@ |
232 | 232 | } |
233 | 233 | |
234 | 234 | // BC for <1.19 |
235 | | - $linker = class_exists('DummyLinker') ? new DummyLinker : new Linker; |
| 235 | + $linker = class_exists( 'DummyLinker' ) ? new DummyLinker : new Linker; |
236 | 236 | |
237 | 237 | $languages = array(); |
238 | 238 | foreach ( $status as $code => $percent ) { |
— | — | @@ -433,7 +433,7 @@ |
434 | 434 | $ready = $page->getReadyTag(); |
435 | 435 | |
436 | 436 | $title = $page->getTitle(); |
437 | | - $linker = class_exists('DummyLinker') ? new DummyLinker : new Linker; |
| 437 | + $linker = class_exists( 'DummyLinker' ) ? new DummyLinker : new Linker; |
438 | 438 | |
439 | 439 | $latest = $title->getLatestRevId(); |
440 | 440 | $canmark = $ready === $latest && $marked !== $latest; |
— | — | @@ -593,7 +593,7 @@ |
594 | 594 | global $wgOut, $wgUser; |
595 | 595 | // $out was only added in some MW version |
596 | 596 | if ( $out === null ) $out = $wgOut; |
597 | | - $linker = class_exists('DummyLinker') ? new DummyLinker : new Linker; |
| 597 | + $linker = class_exists( 'DummyLinker' ) ? new DummyLinker : new Linker; |
598 | 598 | |
599 | 599 | if ( !TranslatablePage::isTranslationPage( $out->getTitle() ) |
600 | 600 | && !TranslatablePage::isSourcePage( $out->getTitle() ) ) { |
— | — | @@ -631,7 +631,7 @@ |
632 | 632 | $subpages .= wfMsgExt( 'pipe-separator', 'escapenoentities' ); |
633 | 633 | } else { |
634 | 634 | // This one is stupid imho, doesn't work with chihuahua |
635 | | - //$subpages .= '< '; |
| 635 | + // $subpages .= '< '; |
636 | 636 | } |
637 | 637 | |
638 | 638 | $subpages .= $getlink; |
Index: trunk/extensions/Translate/TranslateEditAddons.php |
— | — | @@ -418,8 +418,8 @@ |
419 | 419 | return true; |
420 | 420 | } |
421 | 421 | |
422 | | - |
423 | 422 | |
| 423 | + |
424 | 424 | $definitionTitle = Title::makeTitleSafe( $title->getNamespace(), "$key/" . $group->getSourceLanguage() ); |
425 | 425 | if ( $definitionTitle && $definitionTitle->exists() ) { |
426 | 426 | $definitionRevision = $definitionTitle->getLatestRevID(); |
— | — | @@ -501,7 +501,7 @@ |
502 | 502 | 'tooltip' => 'translate-searchprofile-tooltip', |
503 | 503 | 'namespaces' => $wgTranslateMessageNamespaces, |
504 | 504 | ); |
505 | | - |
| 505 | + |
506 | 506 | $profiles = wfArrayInsertAfter( $profiles, $insert, 'help' ); |
507 | 507 | return true; |
508 | 508 | } |
— | — | @@ -511,12 +511,12 @@ |
512 | 512 | return true; |
513 | 513 | } |
514 | 514 | |
515 | | - if( !$search->getSearchEngine()->supports( 'title-suffix-filter' ) ) { |
| 515 | + if ( !$search->getSearchEngine()->supports( 'title-suffix-filter' ) ) { |
516 | 516 | return false; |
517 | 517 | } |
518 | 518 | |
519 | 519 | $hidden = ''; |
520 | | - foreach( $opts as $key => $value ) { |
| 520 | + foreach ( $opts as $key => $value ) { |
521 | 521 | $hidden .= Html::hidden( $key, $value ); |
522 | 522 | } |
523 | 523 | |
Index: trunk/extensions/Translate/utils/MessageWebImporter.php |
— | — | @@ -478,7 +478,7 @@ |
479 | 479 | $containerParams = array( 'class' => "mw-tpt-sp-section mw-tpt-sp-section-type-{$type}" ); |
480 | 480 | $legendParams = array( 'class' => 'mw-tpt-sp-legend' ); |
481 | 481 | $contentParams = array( 'class' => 'mw-tpt-sp-content' ); |
482 | | - if( $lang ) { |
| 482 | + if ( $lang ) { |
483 | 483 | $contentParams['dir'] = wfGetLangObj( $lang )->getDir(); |
484 | 484 | $contentParams['lang'] = wfGetLangObj( $lang )->getCode(); |
485 | 485 | } |
Index: trunk/extensions/Translate/utils/TranslateYaml.php |
— | — | @@ -110,7 +110,7 @@ |
111 | 111 | return Spyc::YAMLDump( $text ); |
112 | 112 | case 'syck-pecl': |
113 | 113 | // Just horrible output |
114 | | - //return syck_dump( $text ); |
| 114 | + // return syck_dump( $text ); |
115 | 115 | case 'syck': |
116 | 116 | return self::syckDump( $text ); |
117 | 117 | default: |
Index: trunk/extensions/Translate/utils/TranslationHelpers.php |
— | — | @@ -902,7 +902,7 @@ |
903 | 903 | } |
904 | 904 | |
905 | 905 | $diff = new DifferenceEngine; |
906 | | - if( method_exists( 'DifferenceEngine', 'setDiffLang' ) ) { |
| 906 | + if ( method_exists( 'DifferenceEngine', 'setDiffLang' ) ) { |
907 | 907 | $diff->setDiffLang( $this->group->getSourceLanguage() ); |
908 | 908 | } |
909 | 909 | $diff->setText( $oldtext, $newtext ); |
— | — | @@ -954,7 +954,7 @@ |
955 | 955 | } |
956 | 956 | |
957 | 957 | $diff = new DifferenceEngine; |
958 | | - if( method_exists( 'DifferenceEngine', 'setDiffLang' ) ) { |
| 958 | + if ( method_exists( 'DifferenceEngine', 'setDiffLang' ) ) { |
959 | 959 | $diff->setDiffLang( $this->group->getSourceLanguage() ); |
960 | 960 | } |
961 | 961 | $diff->setText( $oldtext, $newtext ); |
Index: trunk/extensions/Translate/specials/SpecialSupportedLanguages.php |
— | — | @@ -154,10 +154,10 @@ |
155 | 155 | $conds = array( |
156 | 156 | 'rc_title' . $dbr->buildLike( $dbr->anyString(), '/', $dbr->anyString() ), |
157 | 157 | 'rc_namespace' => $wgTranslateMessageNamespaces, |
158 | | - 'rc_timestamp > ' . $dbr->timestamp( TS_DB, wfTimeStamp( TS_UNIX ) - 60*60*24*180 ), |
| 158 | + 'rc_timestamp > ' . $dbr->timestamp( TS_DB, wfTimeStamp( TS_UNIX ) - 60 * 60 * 24 * 180 ), |
159 | 159 | ); |
160 | 160 | $options = array( 'GROUP BY' => 'lang', 'HAVING' => 'count > 20' ); |
161 | | - |
| 161 | + |
162 | 162 | $res = $dbr->select( $tables, $fields, $conds, __METHOD__, $options ); |
163 | 163 | |
164 | 164 | $data = array(); |
— | — | @@ -188,7 +188,7 @@ |
189 | 189 | 'page_id=rev_page', |
190 | 190 | ); |
191 | 191 | $options = array( 'GROUP BY' => 'rev_user_text, lang' ); |
192 | | - |
| 192 | + |
193 | 193 | $res = $dbr->select( $tables, $fields, $conds, __METHOD__, $options ); |
194 | 194 | |
195 | 195 | $data = array(); |
— | — | @@ -258,7 +258,7 @@ |
259 | 259 | ); |
260 | 260 | |
261 | 261 | $tag = Html::element( 'a', $params, $name ); |
262 | | - $wgOut->addHtml( $tag ."\n" ); |
| 262 | + $wgOut->addHtml( $tag . "\n" ); |
263 | 263 | } |
264 | 264 | $wgOut->addHtml( '</div>' ); |
265 | 265 | } |
— | — | @@ -267,7 +267,7 @@ |
268 | 268 | global $wgOut, $wgLang, $wgUser; |
269 | 269 | $skin = $wgUser->getSkin(); |
270 | 270 | |
271 | | - $day = 60*60*24; |
| 271 | + $day = 60 * 60 * 24; |
272 | 272 | |
273 | 273 | // Scale of the activity colors, anything |
274 | 274 | // longer than this is just inactive |
— | — | @@ -292,7 +292,7 @@ |
293 | 293 | $username, $wgLang->formatNum( $count ), $wgLang->formatNum( $last ) ); |
294 | 294 | $last = max( 1, min( $period, $last ) ); |
295 | 295 | $styles['border-bottom'] = '3px solid #' . $this->getActivityColour( $period - $last, $period ); |
296 | | - #$styles['color'] = '#' . $this->getBackgroundColour( $period - $last, $period ); |
| 296 | + # $styles['color'] = '#' . $this->getBackgroundColour( $period - $last, $period ); |
297 | 297 | } else { |
298 | 298 | $enc = "<s>$enc</s>"; |
299 | 299 | } |
— | — | @@ -325,7 +325,7 @@ |
326 | 326 | $fields = array( 'user_name', 'user_editcount', 'MAX(rev_timestamp) as lastedit' ); |
327 | 327 | $conds = array( 'user_id = rev_user' ); |
328 | 328 | $options = array( 'GROUP BY' => 'user_name' ); |
329 | | - |
| 329 | + |
330 | 330 | $res = $dbr->select( $tables, $fields, $conds, __METHOD__, $options ); |
331 | 331 | foreach ( $res as $row ) { |
332 | 332 | $editcounts[$row->user_name] = $row->user_editcount; |
— | — | @@ -363,16 +363,16 @@ |
364 | 364 | return $red . $green . $blue; |
365 | 365 | } |
366 | 366 | |
367 | | - function shuffle_assoc($list) { |
368 | | - if (!is_array($list)) return $list; |
| 367 | + function shuffle_assoc( $list ) { |
| 368 | + if ( !is_array( $list ) ) return $list; |
369 | 369 | |
370 | | - $keys = array_keys($list); |
371 | | - shuffle($keys); |
372 | | - $random = array(); |
373 | | - foreach ($keys as $key) |
374 | | - $random[$key] = $list[$key]; |
| 370 | + $keys = array_keys( $list ); |
| 371 | + shuffle( $keys ); |
| 372 | + $random = array(); |
| 373 | + foreach ( $keys as $key ) |
| 374 | + $random[$key] = $list[$key]; |
375 | 375 | |
376 | | - return $random; |
| 376 | + return $random; |
377 | 377 | } |
378 | 378 | |
379 | 379 | protected function preQueryUsers( $users ) { |
Index: trunk/extensions/Translate/specials/SpecialLanguageStats.php |
— | — | @@ -355,12 +355,12 @@ |
356 | 356 | |
357 | 357 | // Initialise messages. |
358 | 358 | $collection = $group->initCollection( $code ); |
359 | | - |
| 359 | + |
360 | 360 | $ffs = $group->getFFS(); |
361 | 361 | if ( $ffs instanceof GettextFFS && $code === 'qqq' ) { |
362 | 362 | $template = $ffs->read( 'en' ); |
363 | 363 | $infile = array(); |
364 | | - foreach( $template['TEMPLATE'] as $key => $data ) { |
| 364 | + foreach ( $template['TEMPLATE'] as $key => $data ) { |
365 | 365 | if ( isset( $data['comments']['.'] ) ) { |
366 | 366 | $infile[$key] = '1'; |
367 | 367 | } |