Show no "← Older edit" is no older version available
Closed, ResolvedPublic

Description

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.


Version: unspecified
Severity: enhancement
URL: http://en.wikipedia.org/w/index.php?title=Main_Page&diff=next&oldid=139871

bzimport added a subscriber: Unknown Object (MLST).
bzimport set Reference to bz17913.
Umherirrender created this task.Via LegacyMar 10 2009, 8:34 PM
Umherirrender added a comment.Via ConduitMar 28 2009, 6:50 PM

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.

Umherirrender added a comment.Via ConduitMar 26 2010, 8:12 PM

Created attachment 7248
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

Attached: bug17913.patch

demon added a comment.Via ConduitSep 1 2010, 2:17 PM

Done in r72107.

Add Comment