Index: trunk/phase3/maintenance/language/messages.inc |
— | — | @@ -2032,7 +2032,6 @@ |
2033 | 2033 | 'sp-contributions-explain', |
2034 | 2034 | 'sp-contributions-footer', |
2035 | 2035 | 'sp-contributions-footer-anon', |
2036 | | - 'sp-contributions-showsizediff', |
2037 | 2036 | ), |
2038 | 2037 | 'whatlinkshere' => array( |
2039 | 2038 | '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 ); |
— | — | @@ -380,14 +378,10 @@ |
381 | 379 | $this->opts['topOnly'] = false; |
382 | 380 | } |
383 | 381 | |
384 | | - if( !isset( $this->opts['showSizeDiff'] ) ) { |
385 | | - $this->opts['showSizeDiff'] = !$wgMiserMode; |
386 | | - } |
387 | | - |
388 | 382 | $f = Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript, 'class' => 'mw-contributions-form' ) ); |
389 | 383 | |
390 | 384 | # Add hidden params for tracking except for parameters in $skipParameters |
391 | | - $skipParameters = array( 'namespace', 'deletedOnly', 'target', 'contribs', 'year', 'month', 'topOnly', 'showSizeDiff' ); |
| 385 | + $skipParameters = array( 'namespace', 'deletedOnly', 'target', 'contribs', 'year', 'month', 'topOnly' ); |
392 | 386 | foreach ( $this->opts as $name => $value ) { |
393 | 387 | if( in_array( $name, $skipParameters ) ) { |
394 | 388 | continue; |
— | — | @@ -397,15 +391,11 @@ |
398 | 392 | |
399 | 393 | $tagFilter = ChangeTags::buildTagFilterSelector( $this->opts['tagFilter'] ); |
400 | 394 | |
401 | | - $fNS = ''; |
402 | | - $fShowDiff = ''; |
403 | | - if ( !$wgMiserMode ) { |
404 | | - $fNS = Html::rawElement( 'span', array( 'style' => 'white-space: nowrap' ), |
405 | | - Xml::label( wfMsg( 'namespace' ), 'namespace' ) . ' ' . |
406 | | - Xml::namespaceSelector( $this->opts['namespace'], '' ) |
407 | | - ); |
408 | | - $fShowDiff = Xml::checkLabel( wfMsg( 'sp-contributions-showsizediff' ), 'showSizeDiff', 'mw-show-size-diff', $this->opts['showSizeDiff'] ); |
409 | | - } |
| 395 | + $fNS = ( $wgMiserMode ) ? '' : |
| 396 | + Html::rawElement( 'span', array( 'style' => 'white-space: nowrap' ), |
| 397 | + Xml::label( wfMsg( 'namespace' ), 'namespace' ) . ' ' . |
| 398 | + Xml::namespaceSelector( $this->opts['namespace'], '' ) |
| 399 | + ); |
410 | 400 | |
411 | 401 | $f .= Xml::fieldset( wfMsg( 'sp-contributions-search' ) ) . |
412 | 402 | Xml::radioLabel( wfMsgExt( 'sp-contributions-newbies', array( 'parsemag' ) ), |
— | — | @@ -421,7 +411,6 @@ |
422 | 412 | 'deletedOnly', 'mw-show-deleted-only', $this->opts['deletedOnly'] ) . '<br />' . |
423 | 413 | Xml::tags( 'p', null, Xml::checkLabel( wfMsg( 'sp-contributions-toponly' ), |
424 | 414 | 'topOnly', 'mw-show-top-only', $this->opts['topOnly'] ) ) . |
425 | | - $fShowDiff. |
426 | 415 | ( $tagFilter ? Xml::tags( 'p', null, implode( ' ', $tagFilter ) ) : '' ) . |
427 | 416 | Html::rawElement( 'p', array( 'style' => 'white-space: nowrap' ), |
428 | 417 | Xml::dateMenu( $this->opts['year'], $this->opts['month'] ) . ' ' . |
— | — | @@ -462,7 +451,6 @@ |
463 | 452 | |
464 | 453 | $this->deletedOnly = !empty( $options['deletedOnly'] ); |
465 | 454 | $this->topOnly = !empty( $options['topOnly'] ); |
466 | | - $this->showSizeDiff = !empty( $options['showSizeDiff'] ); |
467 | 455 | |
468 | 456 | $year = isset( $options['year'] ) ? $options['year'] : false; |
469 | 457 | $month = isset( $options['month'] ) ? $options['month'] : false; |
— | — | @@ -482,7 +470,7 @@ |
483 | 471 | } |
484 | 472 | |
485 | 473 | function getQueryInfo() { |
486 | | - global $wgUser, $wgMiserMode; |
| 474 | + global $wgUser; |
487 | 475 | list( $tables, $index, $userCond, $join_cond ) = $this->getUserCond(); |
488 | 476 | |
489 | 477 | $conds = array_merge( $userCond, $this->getNamespaceCond() ); |
— | — | @@ -495,25 +483,18 @@ |
496 | 484 | } |
497 | 485 | $join_cond['page'] = array( 'INNER JOIN', 'page_id=rev_page' ); |
498 | 486 | |
499 | | - $fields = array( |
500 | | - 'page_namespace', 'page_title', 'page_is_new', 'page_latest', 'page_is_redirect', |
501 | | - 'page_len','rev_id', 'rev_page', 'rev_text_id', 'rev_timestamp', 'rev_comment', |
502 | | - 'rev_minor_edit', 'rev_user', 'rev_user_text', 'rev_parent_id', 'rev_deleted', |
503 | | - 'rev_len' |
504 | | - ); |
505 | | - if ( $this->showSizeDiff && !$wgMiserMode ) { |
506 | | - $fields = array_merge( $fields, array( 'rc_old_len', 'rc_new_len' ) ); |
507 | | - array_unshift( $tables, 'recentchanges' ); |
508 | | - $join_cond['recentchanges'] = array( 'INNER JOIN', "rev_id = rc_this_oldid" ); |
509 | | - } |
510 | | - |
511 | 487 | $queryInfo = array( |
512 | 488 | 'tables' => $tables, |
513 | | - 'fields' => $fields, |
| 489 | + 'fields' => array( |
| 490 | + 'page_namespace', 'page_title', 'page_is_new', 'page_latest', 'page_is_redirect', |
| 491 | + 'page_len','rev_id', 'rev_page', 'rev_text_id', 'rev_timestamp', 'rev_comment', |
| 492 | + 'rev_minor_edit', 'rev_user', 'rev_user_text', 'rev_parent_id', 'rev_deleted' |
| 493 | + ), |
514 | 494 | 'conds' => $conds, |
515 | 495 | 'options' => array( 'USE INDEX' => array('revision' => $index) ), |
516 | 496 | 'join_conds' => $join_cond |
517 | 497 | ); |
| 498 | + |
518 | 499 | ChangeTags::modifyDisplayQuery( |
519 | 500 | $queryInfo['tables'], |
520 | 501 | $queryInfo['fields'], |
— | — | @@ -527,10 +508,9 @@ |
528 | 509 | return $queryInfo; |
529 | 510 | } |
530 | 511 | |
531 | | - function getUserCond() { |
| 512 | + function getUserCond() { |
532 | 513 | $condition = array(); |
533 | 514 | $join_conds = array(); |
534 | | - |
535 | 515 | if( $this->target == 'newbies' ) { |
536 | 516 | $tables = array( 'user_groups', 'page', 'revision' ); |
537 | 517 | $max = $this->mDb->selectField( 'user', 'max(user_id)', false, __METHOD__ ); |
— | — | @@ -539,11 +519,9 @@ |
540 | 520 | $index = 'user_timestamp'; |
541 | 521 | # @todo FIXME: Other groups may have 'bot' rights |
542 | 522 | $join_conds['user_groups'] = array( 'LEFT JOIN', "ug_user = rev_user AND ug_group = 'bot'" ); |
543 | | - $join_conds['recentchanges'] = array( 'INNER JOIN', "rev_id = rc_this_oldid AND rev_timestamp = rc_timestamp" ); |
544 | 523 | } else { |
545 | 524 | $tables = array( 'page', 'revision' ); |
546 | 525 | $condition['rev_user_text'] = $this->target; |
547 | | - $join_conds['recentchanges'] = array( 'INNER JOIN', "rev_id = rc_this_oldid AND rev_timestamp = rc_timestamp" ); |
548 | 526 | $index = 'usertext_timestamp'; |
549 | 527 | } |
550 | 528 | if( $this->deletedOnly ) { |
— | — | @@ -689,13 +667,8 @@ |
690 | 668 | } |
691 | 669 | |
692 | 670 | $diffHistLinks = '(' . $difftext . $this->messages['pipe-separator'] . $histlink . ')'; |
| 671 | + $ret = "{$del}{$d} {$diffHistLinks} {$nflag}{$mflag} {$link}{$userlink} {$comment} {$topmarktext}"; |
693 | 672 | |
694 | | - |
695 | | - $diffOut = ' . . ' . $wgLang->getDirMark() . ( $this->showSizeDiff ? |
696 | | - ChangesList::showCharacterDifference( $row->rc_old_len, $row->rc_new_len ) : Linker::formatRevisionSize( $row->rev_len ) ); |
697 | | - |
698 | | - $ret = "{$del}{$d} {$diffHistLinks} {$nflag}{$mflag} {$link}{$diffOut}{$userlink} {$comment} {$topmarktext}"; |
699 | | - |
700 | 673 | # Denote if username is redacted for this edit |
701 | 674 | if( $rev->isDeleted( Revision::DELETED_USER ) ) { |
702 | 675 | $ret .= " <strong>" . wfMsgHtml('rev-deleted-user-contribs') . "</strong>"; |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -3006,7 +3006,6 @@ |
3007 | 3007 | 'sp-contributions-explain' => '', # only translate this message to other languages if you have to change it |
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 | | -'sp-contributions-showsizediff' => 'Display difference in page size', |
3011 | 3010 | |
3012 | 3011 | # What links here |
3013 | 3012 | 'whatlinkshere' => 'What links here', |