Don't link to new page diffs
authorAaron Schulz <aaron@users.mediawiki.org>
Fri, 11 Apr 2008 17:01:40 +0000 (17:01 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Fri, 11 Apr 2008 17:01:40 +0000 (17:01 +0000)
includes/SpecialContributions.php

index 44df343..a307df1 100644 (file)
@@ -147,7 +147,8 @@ class ContribsPager extends ReverseChronologicalPager {
                        }
 
                }
-               if( $rev->userCan( Revision::DELETED_TEXT ) ) {
+               # Is there a visable previous revision?
+               if( $rev->userCan(Revision::DELETED_TEXT) && $rev->getParentId() !== 0 ) {
                        $difftext = '(' . $sk->makeKnownLinkObj( $page, $this->messages['diff'], 'diff=prev&oldid='.$row->rev_id ) . ')';
                } else {
                        $difftext = '(' . $this->messages['diff'] . ')';