Index: trunk/phase3/maintenance/language/messages.inc |
— | — | @@ -2033,7 +2033,6 @@ |
2034 | 2034 | 'sp-contributions-explain', |
2035 | 2035 | 'sp-contributions-footer', |
2036 | 2036 | 'sp-contributions-footer-anon', |
2037 | | - 'sp-contributions-showsizediff', |
2038 | 2037 | ), |
2039 | 2038 | 'whatlinkshere' => array( |
2040 | 2039 | 'whatlinkshere', |
Index: trunk/phase3/includes/specials/SpecialContributions.php |
— | — | @@ -69,7 +69,6 @@ |
70 | 70 | $this->opts['limit'] = $wgRequest->getInt( 'limit', $wgUser->getOption('rclimit') ); |
71 | 71 | $this->opts['target'] = $target; |
72 | 72 | $this->opts['topOnly'] = $wgRequest->getBool( 'topOnly' ); |
73 | | - $this->opts['showSizeDiff'] = $wgRequest->getBool( 'showSizeDiff' ); |
74 | 73 | |
75 | 74 | $nt = Title::makeTitleSafe( NS_USER, $target ); |
76 | 75 | if( !$nt ) { |
— | — | @@ -166,7 +165,6 @@ |
167 | 166 | 'month' => $this->opts['month'], |
168 | 167 | 'deletedOnly' => $this->opts['deletedOnly'], |
169 | 168 | 'topOnly' => $this->opts['topOnly'], |
170 | | - 'showSizeDiff' => $this->opts['showSizeDiff'], |
171 | 169 | ) ); |
172 | 170 | if( !$pager->getNumRows() ) { |
173 | 171 | $wgOut->addWikiMsg( 'nocontribs', $target ); |
— | — | @@ -379,14 +377,10 @@ |
380 | 378 | $this->opts['topOnly'] = false; |
381 | 379 | } |
382 | 380 | |
383 | | - if( !isset( $this->opts['showSizeDiff'] ) ) { |
384 | | - $this->opts['showSizeDiff'] = !$wgMiserMode; |
385 | | - } |
386 | | - |
387 | 381 | $f = Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript, 'class' => 'mw-contributions-form' ) ); |
388 | 382 | |
389 | 383 | # Add hidden params for tracking except for parameters in $skipParameters |
390 | | - $skipParameters = array( 'namespace', 'deletedOnly', 'target', 'contribs', 'year', 'month', 'topOnly', 'showSizeDiff' ); |
| 384 | + $skipParameters = array( 'namespace', 'deletedOnly', 'target', 'contribs', 'year', 'month', 'topOnly' ); |
391 | 385 | foreach ( $this->opts as $name => $value ) { |
392 | 386 | if( in_array( $name, $skipParameters ) ) { |
393 | 387 | continue; |
— | — | @@ -397,13 +391,10 @@ |
398 | 392 | $tagFilter = ChangeTags::buildTagFilterSelector( $this->opts['tagFilter'] ); |
399 | 393 | |
400 | 394 | $fNS = ''; |
401 | | - $fShowDiff = ''; |
402 | 395 | if ( !$wgMiserMode ) { |
403 | 396 | $fNS = Html::rawElement( 'span', array( 'style' => 'white-space: nowrap' ), |
404 | | - Xml::label( wfMsg( 'namespace' ), 'namespace' ) . ' ' . |
405 | | - Xml::namespaceSelector( $this->opts['namespace'], '' ) |
406 | | - ); |
407 | | - $fShowDiff = Xml::checkLabel( wfMsg( 'sp-contributions-showsizediff' ), 'showSizeDiff', 'mw-show-size-diff', $this->opts['showSizeDiff'] ); |
| 397 | + Xml::label( wfMsg( 'namespace' ), 'namespace' ) . ' ' . Xml::namespaceSelector( $this->opts['namespace'], '' ) |
| 398 | + ); |
408 | 399 | } |
409 | 400 | |
410 | 401 | $f .= Xml::fieldset( wfMsg( 'sp-contributions-search' ) ) . |
— | — | @@ -420,7 +411,6 @@ |
421 | 412 | 'deletedOnly', 'mw-show-deleted-only', $this->opts['deletedOnly'] ) . '<br />' . |
422 | 413 | Xml::tags( 'p', null, Xml::checkLabel( wfMsg( 'sp-contributions-toponly' ), |
423 | 414 | 'topOnly', 'mw-show-top-only', $this->opts['topOnly'] ) ) . |
424 | | - $fShowDiff. |
425 | 415 | ( $tagFilter ? Xml::tags( 'p', null, implode( ' ', $tagFilter ) ) : '' ) . |
426 | 416 | Html::rawElement( 'p', array( 'style' => 'white-space: nowrap' ), |
427 | 417 | Xml::dateMenu( $this->opts['year'], $this->opts['month'] ) . ' ' . |
— | — | @@ -461,7 +451,6 @@ |
462 | 452 | |
463 | 453 | $this->deletedOnly = !empty( $options['deletedOnly'] ); |
464 | 454 | $this->topOnly = !empty( $options['topOnly'] ); |
465 | | - $this->showSizeDiff = !empty( $options['showSizeDiff'] ); |
466 | 455 | |
467 | 456 | $year = isset( $options['year'] ) ? $options['year'] : false; |
468 | 457 | $month = isset( $options['month'] ) ? $options['month'] : false; |
— | — | @@ -481,7 +470,7 @@ |
482 | 471 | } |
483 | 472 | |
484 | 473 | function getQueryInfo() { |
485 | | - global $wgUser, $wgMiserMode; |
| 474 | + global $wgUser; |
486 | 475 | list( $tables, $index, $userCond, $join_cond ) = $this->getUserCond(); |
487 | 476 | |
488 | 477 | $conds = array_merge( $userCond, $this->getNamespaceCond() ); |
— | — | @@ -497,18 +486,17 @@ |
498 | 487 | $fields = array( |
499 | 488 | 'page_namespace', 'page_title', 'page_is_new', 'page_latest', 'page_is_redirect', |
500 | 489 | 'page_len','rev_id', 'rev_page', 'rev_text_id', 'rev_timestamp', 'rev_comment', |
501 | | - 'rev_minor_edit', 'rev_user', 'rev_user_text', 'rev_parent_id', 'rev_deleted', |
502 | | - 'rev_len' |
| 490 | + 'rev_minor_edit', 'rev_user', 'rev_user_text', 'rev_parent_id', 'rev_deleted' |
503 | 491 | ); |
504 | | - if ( $this->showSizeDiff && !$wgMiserMode ) { |
505 | | - $fields = array_merge( $fields, array( 'rc_old_len', 'rc_new_len' ) ); |
506 | | - array_unshift( $tables, 'recentchanges' ); |
507 | | - $join_cond['recentchanges'] = array( 'INNER JOIN', "rev_id = rc_this_oldid" ); |
508 | | - } |
509 | 492 | |
510 | 493 | $queryInfo = array( |
511 | 494 | 'tables' => $tables, |
512 | | - 'fields' => $fields, |
| 495 | + 'fields' => array( |
| 496 | + 'page_namespace', 'page_title', 'page_is_new', 'page_latest', 'page_is_redirect', |
| 497 | + 'page_len','rev_id', 'rev_page', 'rev_text_id', 'rev_timestamp', 'rev_comment', |
| 498 | + 'rev_minor_edit', 'rev_user', 'rev_user_text', 'rev_parent_id', 'rev_deleted', |
| 499 | + 'rc_old_len', 'rc_new_len' |
| 500 | + ), |
513 | 501 | 'conds' => $conds, |
514 | 502 | 'options' => array( 'USE INDEX' => array('revision' => $index) ), |
515 | 503 | 'join_conds' => $join_cond |
— | — | @@ -531,16 +519,18 @@ |
532 | 520 | $join_conds = array(); |
533 | 521 | |
534 | 522 | if( $this->target == 'newbies' ) { |
535 | | - $tables = array( 'user_groups', 'page', 'revision' ); |
| 523 | + $tables = array( 'recentchanges', 'user_groups', 'page', 'revision' ); |
536 | 524 | $max = $this->mDb->selectField( 'user', 'max(user_id)', false, __METHOD__ ); |
537 | 525 | $condition[] = 'rev_user >' . (int)($max - $max / 100); |
538 | 526 | $condition[] = 'ug_group IS NULL'; |
539 | 527 | $index = 'user_timestamp'; |
540 | 528 | # @todo FIXME: Other groups may have 'bot' rights |
541 | 529 | $join_conds['user_groups'] = array( 'LEFT JOIN', "ug_user = rev_user AND ug_group = 'bot'" ); |
| 530 | + $join_conds['recentchanges'] = array( 'INNER JOIN', "rev_id = rc_this_oldid" ); |
542 | 531 | } else { |
543 | | - $tables = array( 'page', 'revision' ); |
| 532 | + $tables = array( 'recentchanges', 'page', 'revision' ); |
544 | 533 | $condition['rev_user_text'] = $this->target; |
| 534 | + $join_conds['recentchanges'] = array( 'INNER JOIN', "rev_id = rc_this_oldid" ); |
545 | 535 | $index = 'usertext_timestamp'; |
546 | 536 | } |
547 | 537 | if( $this->deletedOnly ) { |
— | — | @@ -689,7 +679,7 @@ |
690 | 680 | |
691 | 681 | |
692 | 682 | $diffOut = ' . . ' . $wgLang->getDirMark() . ( $this->showSizeDiff ? |
693 | | - ChangesList::showCharacterDifference( $row->rc_old_len, $row->rc_new_len ) : Linker::formatRevisionSize( $row->rev_len ) ); |
| 683 | + ChangesList::showCharacterDifference( $row->rc_old_len, $row->rc_new_len ) : '' ); |
694 | 684 | |
695 | 685 | $ret = "{$del}{$d} {$diffHistLinks} {$nflag}{$mflag} {$link}{$diffOut}{$userlink} {$comment} {$topmarktext}"; |
696 | 686 | |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -3007,6 +3007,7 @@ |
3008 | 3008 | 'sp-contributions-footer' => '-', # do not translate or duplicate this message to other languages |
3009 | 3009 | 'sp-contributions-footer-anon' => '-', # do not translate or duplicate this message to other languages |
3010 | 3010 | 'sp-contributions-showsizediff' => 'Display difference in page size', |
| 3011 | +'sp-contributions-showsizediff-warn' => 'This instance has recent changes log limited to $1 . If you use this option, pages not in this log will not be displayed', |
3011 | 3012 | |
3012 | 3013 | # What links here |
3013 | 3014 | 'whatlinkshere' => 'What links here', |