Page MenuHomePhabricator

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

Details

Reference
bz17913

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:35 PM
bzimport set Reference to bz17913.
bzimport added a subscriber: Unknown Object (MLST).

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
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: