Last modified: 2010-09-01 14:17:14 UTC
On the last diff of a page "Newer edit →" is not shown, but when look at the first diff of a page "← Older edit" is shown and suggest there is any diff, but when click that link the first revision is load and no diff. I think that is not intuition. The link should not shown, when a older version is not available.
function 'showDiffPage' in 'DifferenceEngine.php' should test if the oldid the first one, and then set "$prevlink = ' ';" in the same way like $nextlink. For example: if ( $this->mOldRev->getPrevious() != null ) { $prevlink = $sk->makeKnownLinkObj( $this->mTitle, wfMsgHtml( 'previousdiff' ), 'diff=prev&oldid='.$this->mOldid.$htmldiffarg, '', '', 'id="differences-prevlink"' ); } else { $prevlink = ' '; } I am not so familiar with php and mediawiki, so I cannot give you a patch, only this idea.
Created attachment 7248 [details] untested patch (In reply to comment #1) > function 'showDiffPage' in 'DifferenceEngine.php' should test if the oldid the > first one, and then set "$prevlink = ' ';" in the same way like $nextlink. > For example: > if ( $this->mOldRev->getPrevious() != null ) { > $prevlink = $sk->makeKnownLinkObj( $this->mTitle, wfMsgHtml( > 'previousdiff' ), > 'diff=prev&oldid='.$this->mOldid.$htmldiffarg, '', '', > 'id="differences-prevlink"' ); > } else { > $prevlink = ' '; > } > I am not so familiar with php and mediawiki, so I cannot give you a patch, only > this idea. patch attached
Done in r72107.