r57490 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r57489‎ | r57490 | r57491 >
Date:21:26, 7 October 2009
Author:brion
Status:ok
Tags:
Comment:
merge trunk r57489 -- partial revert of r56549 -- undo incorrect escaping on contribs/newbies messages
Modified paths:
  • /branches/wmf-deployment/includes/specials/SpecialContributions.php (modified) (history)

Diff [purge]

Index: branches/wmf-deployment/includes/specials/SpecialContributions.php
@@ -245,7 +245,7 @@
246246 );
247247 }
248248 }
249 -
 249+
250250 // Old message 'contribsub' had one parameter, but that doesn't work for
251251 // languages that want to put the "for" bit right after $user but before
252252 // $links. If 'contribsub' is around, use it for reverse compatibility,
@@ -433,13 +433,9 @@
434434
435435 function __construct( $target, $namespace = false, $year = false, $month = false, $tagFilter = false ) {
436436 parent::__construct();
437 -
438 - $msgs = array( 'uctop', 'diff', 'newarticle', 'rollbacklink', 'diff', 'hist', 'rev-delundel', 'pipe-separator' );
439 -
440 - foreach( $msgs as $msg ) {
441 - $this->messages[$msg] = wfMsgExt( $msg, 'escapenoentities' );
 437+ foreach( explode( ' ', 'uctop diff newarticle rollbacklink diff hist rev-delundel pipe-separator' ) as $msg ) {
 438+ $this->messages[$msg] = wfMsgExt( $msg, array( 'escape') );
442439 }
443 -
444440 $this->target = $target;
445441 $this->namespace = $namespace;
446442 $this->tagFilter = $tagFilter;
@@ -480,16 +476,14 @@
481477 'options' => array( 'USE INDEX' => array('revision' => $index) ),
482478 'join_conds' => $join_cond
483479 );
484 -
485 - ChangeTags::modifyDisplayQuery(
486 - $queryInfo['tables'],
487 - $queryInfo['fields'],
488 - $queryInfo['conds'],
489 - $queryInfo['join_conds'],
490 - $queryInfo['options'],
491 - $this->tagFilter
492 - );
493 -
 480+
 481+ ChangeTags::modifyDisplayQuery( $queryInfo['tables'],
 482+ $queryInfo['fields'],
 483+ $queryInfo['conds'],
 484+ $queryInfo['join_conds'],
 485+ $queryInfo['options'],
 486+ $this->tagFilter );
 487+
494488 wfRunHooks( 'ContribsPager::getQueryInfo', array( &$this, &$queryInfo ) );
495489 return $queryInfo;
496490 }
@@ -564,13 +558,12 @@
565559 if( $row->rev_id == $row->page_latest ) {
566560 $topmarktext .= '<span class="mw-uctop">' . $this->messages['uctop'] . '</span>';
567561 if( !$row->page_is_new ) {
568 - $difflink = $sk->linkKnown(
 562+ $difftext .= '(' . $sk->linkKnown(
569563 $page,
570564 $this->messages['diff'],
571565 array(),
572566 array( 'diff' => 0 )
573 - );
574 - $difftext .= wfMsg( 'parentheses', $difflink );
 567+ ) . ')';
575568 # Add rollback link
576569 if( $page->quickUserCan( 'rollback') && $page->quickUserCan( 'edit' ) ) {
577570 $topmarktext .= ' '.$sk->generateRollback( $rev );
@@ -615,7 +608,7 @@
616609
617610 if( $this->target == 'newbies' ) {
618611 $userlink = ' . . ' . $sk->userLink( $row->rev_user, $row->rev_user_text );
619 - $userlink .= ' ' . wfMsgExt( 'parentheses', 'escapenoentities', $sk->userTalkLink( $row->rev_user, $row->rev_user_text ) ) . ' ';
 612+ $userlink .= ' (' . $sk->userTalkLink( $row->rev_user, $row->rev_user_text ) . ') ';
620613 } else {
621614 $userlink = '';
622615 }
@@ -637,7 +630,7 @@
638631 // If revision was hidden from sysops
639632 if( !$rev->userCan( Revision::DELETED_RESTRICTED ) ) {
640633 $del = Xml::tags( 'span', array( 'class'=>'mw-revdelundel-link' ),
641 - wfMsg( 'parentheses', $this->messages['rev-delundel'] ) ) . ' ';
 634+ '(' . $this->messages['rev-delundel'] . ')' ) . ' ';
642635 // Otherwise, show the link...
643636 } else {
644637 $query = array(
Property changes on: branches/wmf-deployment/includes/specials/SpecialContributions.php
___________________________________________________________________
Name: svn:mergeinfo
645638 - /branches/REL1_15/phase3/includes/specials/SpecialContributions.php:51646
/branches/wmf-deployment/includes/specials/SpecialContributions.php:53381
/trunk/phase3/includes/specials/SpecialContributions.php:56188,56468,57154-57447,57478
646639 + /branches/REL1_15/phase3/includes/specials/SpecialContributions.php:51646
/branches/wmf-deployment/includes/specials/SpecialContributions.php:53381
/trunk/phase3/includes/specials/SpecialContributions.php:56188,56468,57154-57447,57478,57489

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r56549* process messages with escapenoentities instead of escape to allow for examp...siebrand17:55, 17 September 2009
r57489Partial revert r56549 -- too much HTML escaping on user tools links for /newb...brion21:24, 7 October 2009

Status & tagging log