From: Alexandre Emsenhuber Date: Wed, 14 Oct 2009 21:19:24 +0000 (+0000) Subject: * (bug 21114) Special:Contributions no longer shows diff links for new revisions X-Git-Tag: 1.31.0-rc.0~39286 X-Git-Url: https://git.cyclocoop.org//%22?a=commitdiff_plain;h=84be101a9098166731fe6a1e30615d2f9b094eeb;p=lhc%2Fweb%2Fwiklou.git * (bug 21114) Special:Contributions no longer shows diff links for new revisions * Removed some code that is newer used ($difftext is always overridden below) --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 4759d1724e..ce8fd46dbd 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -557,6 +557,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN false on non-special pages * (bug 21113) "Other statistics" header on Special:Statistics is no more displayed when there isn't any entry in it +* (bug 21114) Special:Contributions no longer shows diff links for new revisions == API changes in 1.16 == diff --git a/includes/specials/SpecialContributions.php b/includes/specials/SpecialContributions.php index 96b26a17b6..66748327dc 100644 --- a/includes/specials/SpecialContributions.php +++ b/includes/specials/SpecialContributions.php @@ -563,24 +563,13 @@ class ContribsPager extends ReverseChronologicalPager { $difftext = $topmarktext = ''; if( $row->rev_id == $row->page_latest ) { $topmarktext .= '' . $this->messages['uctop'] . ''; - if( !$row->page_is_new ) { - $difflink = $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 ); - } - } else { - $difftext .= $this->messages['newarticle']; + # Add rollback link + if( !$row->page_is_new && $page->quickUserCan( 'rollback' ) && $page->quickUserCan( 'edit' ) ) { + $topmarktext .= ' '.$sk->generateRollback( $rev ); } } # Is there a visible previous revision? - if( !$rev->isDeleted(Revision::DELETED_TEXT) ) { + if( !$rev->isDeleted( Revision::DELETED_TEXT ) && $rev->getParentId() !== 0 ) { $difftext = $this->messages['pipe-separator'] . $sk->linkKnown( $page, $this->messages['diff'],