Index: includes/specials/SpecialContributions.php =================================================================== --- includes/specials/SpecialContributions.php (revision 39057) +++ includes/specials/SpecialContributions.php (working copy) @@ -16,7 +16,7 @@ function __construct( $target, $namespace = false, $year = false, $month = false ) { parent::__construct(); - foreach( explode( ' ', 'uctop diff newarticle rollbacklink diff hist newpageletter minoreditletter' ) as $msg ) { + foreach( explode( ' ', 'uctop diff newarticle rollbacklink diff hist watch unwatch newpageletter minoreditletter' ) as $msg ) { $this->messages[$msg] = wfMsgExt( $msg, array( 'escape') ); } $this->target = $target; @@ -128,6 +128,10 @@ $difftext = '(' . $this->messages['diff'] . ')'; } $histlink='('.$sk->makeKnownLinkObj( $page, $this->messages['hist'], 'action=history' ) . ')'; + if( $wgUser->isLoggedIn() ) { + $watchaction = $page->userIsWatching() ? 'unwatch' : 'watch'; + $watchlink = '(' . $sk->makeKnownLinkObj( $page, strtolower( $this->messages[$watchaction] ), 'action=' . $watchaction ) . ')'; + } $comment = $wgContLang->getDirMark() . $sk->revComment( $rev, false, true ); $d = $wgLang->timeanddate( wfTimestamp( TS_MW, $row->rev_timestamp ), true ); @@ -155,7 +159,7 @@ $mflag = ''; } - $ret = "{$d} {$histlink} {$difftext} {$nflag}{$mflag} {$link}{$userlink}{$comment} {$topmarktext}"; + $ret = "{$d} {$histlink} {$difftext} {$watchlink} {$nflag}{$mflag} {$link}{$userlink}{$comment} {$topmarktext}"; if( $rev->isDeleted( Revision::DELETED_TEXT ) ) { $ret .= ' ' . wfMsgHtml( 'deletedrev' ); }