r35844 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r35843‎ | r35844 | r35845 >
Date:03:31, 4 June 2008
Author:tstarling
Status:old
Tags:
Comment:
Reverted r35829, breaks the suppression of the "next diff" link ("newer edit" on wikipedia) when viewing a diff to the current revision.
Modified paths:
  • /trunk/phase3/includes/DifferenceEngine.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/DifferenceEngine.php
@@ -206,8 +206,12 @@
207207
208208 $prevlink = $sk->makeKnownLinkObj( $this->mTitle, wfMsgHtml( 'previousdiff' ),
209209 'diff=prev&oldid='.$this->mOldid, '', '', 'id="differences-prevlink"' );
210 - $nextlink = $sk->makeKnownLinkObj( $this->mTitle, wfMsgHtml( 'nextdiff' ),
211 - 'diff=next&oldid='.$this->mNewid, '', '', 'id="differences-nextlink"' );
 210+ if ( $this->mNewRev->isCurrent() ) {
 211+ $nextlink = ' ';
 212+ } else {
 213+ $nextlink = $sk->makeKnownLinkObj( $this->mTitle, wfMsgHtml( 'nextdiff' ),
 214+ 'diff=next&oldid='.$this->mNewid, '', '', 'id="differences-nextlink"' );
 215+ }
212216
213217 $oldminor = '';
214218 $newminor = '';
@@ -670,7 +674,7 @@
671675 $timestamp = $wgLang->timeanddate( $this->mNewRev->getTimestamp(), true );
672676 $this->mNewPage = $this->mNewRev->getTitle();
673677 if( $this->mNewRev->isCurrent() ) {
674 - $newLink = $this->mNewPage->escapeLocalUrl( 'oldid=' . $this->mNewid );
 678+ $newLink = $this->mNewPage->escapeLocalUrl();
675679 $this->mPagetitle = htmlspecialchars( wfMsg( 'currentrev' ) );
676680 $newEdit = $this->mNewPage->escapeLocalUrl( 'action=edit' );
677681

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r35829Make link to current not be misleading if the diff is outdated (also bug 14395)aaron23:51, 3 June 2008

Status & tagging log