From e6ee2def90e8b3ef2eb4b7cb2d42ff07a8f6171f Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 7 Oct 2009 21:24:49 +0000 Subject: [PATCH] Partial revert r56549 -- too much HTML escaping on user tools links for /newbies mode --- includes/specials/SpecialContributions.php | 37 +++++++++------------- 1 file changed, 15 insertions(+), 22 deletions(-) diff --git a/includes/specials/SpecialContributions.php b/includes/specials/SpecialContributions.php index eada167696..d145e2285f 100644 --- a/includes/specials/SpecialContributions.php +++ b/includes/specials/SpecialContributions.php @@ -245,7 +245,7 @@ class SpecialContributions extends SpecialPage { ); } } - + // Old message 'contribsub' had one parameter, but that doesn't work for // languages that want to put the "for" bit right after $user but before // $links. If 'contribsub' is around, use it for reverse compatibility, @@ -433,13 +433,9 @@ class ContribsPager extends ReverseChronologicalPager { function __construct( $target, $namespace = false, $year = false, $month = false, $tagFilter = false ) { parent::__construct(); - - $msgs = array( 'uctop', 'diff', 'newarticle', 'rollbacklink', 'diff', 'hist', 'rev-delundel', 'pipe-separator' ); - - foreach( $msgs as $msg ) { - $this->messages[$msg] = wfMsgExt( $msg, 'escapenoentities' ); + foreach( explode( ' ', 'uctop diff newarticle rollbacklink diff hist rev-delundel pipe-separator' ) as $msg ) { + $this->messages[$msg] = wfMsgExt( $msg, array( 'escape') ); } - $this->target = $target; $this->namespace = $namespace; $this->tagFilter = $tagFilter; @@ -480,16 +476,14 @@ class ContribsPager extends ReverseChronologicalPager { 'options' => array( 'USE INDEX' => array('revision' => $index) ), 'join_conds' => $join_cond ); - - ChangeTags::modifyDisplayQuery( - $queryInfo['tables'], - $queryInfo['fields'], - $queryInfo['conds'], - $queryInfo['join_conds'], - $queryInfo['options'], - $this->tagFilter - ); - + + ChangeTags::modifyDisplayQuery( $queryInfo['tables'], + $queryInfo['fields'], + $queryInfo['conds'], + $queryInfo['join_conds'], + $queryInfo['options'], + $this->tagFilter ); + wfRunHooks( 'ContribsPager::getQueryInfo', array( &$this, &$queryInfo ) ); return $queryInfo; } @@ -564,13 +558,12 @@ class ContribsPager extends ReverseChronologicalPager { if( $row->rev_id == $row->page_latest ) { $topmarktext .= '' . $this->messages['uctop'] . ''; if( !$row->page_is_new ) { - $difflink = $sk->linkKnown( + $difftext .= '(' . $sk->linkKnown( $page, $this->messages['diff'], array(), array( 'diff' => 0 ) - ); - $difftext .= wfMsg( 'parentheses', $difflink ); + ) . ')'; # Add rollback link if( $page->quickUserCan( 'rollback') && $page->quickUserCan( 'edit' ) ) { $topmarktext .= ' '.$sk->generateRollback( $rev ); @@ -615,7 +608,7 @@ class ContribsPager extends ReverseChronologicalPager { if( $this->target == 'newbies' ) { $userlink = ' . . ' . $sk->userLink( $row->rev_user, $row->rev_user_text ); - $userlink .= ' ' . wfMsgExt( 'parentheses', 'escapenoentities', $sk->userTalkLink( $row->rev_user, $row->rev_user_text ) ) . ' '; + $userlink .= ' (' . $sk->userTalkLink( $row->rev_user, $row->rev_user_text ) . ') '; } else { $userlink = ''; } @@ -637,7 +630,7 @@ class ContribsPager extends ReverseChronologicalPager { // If revision was hidden from sysops if( !$rev->userCan( Revision::DELETED_RESTRICTED ) ) { $del = Xml::tags( 'span', array( 'class'=>'mw-revdelundel-link' ), - wfMsg( 'parentheses', $this->messages['rev-delundel'] ) ) . ' '; + '(' . $this->messages['rev-delundel'] . ')' ) . ' '; // Otherwise, show the link... } else { $query = array( -- 2.20.1