r35829 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r35828‎ | r35829 | r35830 >
Date:23:51, 3 June 2008
Author:aaron
Status:old
Tags:
Comment:
Make link to current not be misleading if the diff is outdated (also bug 14395)
Modified paths:
  • /trunk/phase3/includes/DifferenceEngine.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/DifferenceEngine.php
@@ -206,12 +206,8 @@
207207
208208 $prevlink = $sk->makeKnownLinkObj( $this->mTitle, wfMsgHtml( 'previousdiff' ),
209209 'diff=prev&oldid='.$this->mOldid, '', '', 'id="differences-prevlink"' );
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 - }
 210+ $nextlink = $sk->makeKnownLinkObj( $this->mTitle, wfMsgHtml( 'nextdiff' ),
 211+ 'diff=next&oldid='.$this->mNewid, '', '', 'id="differences-nextlink"' );
216212
217213 $oldminor = '';
218214 $newminor = '';
@@ -674,7 +670,7 @@
675671 $timestamp = $wgLang->timeanddate( $this->mNewRev->getTimestamp(), true );
676672 $this->mNewPage = $this->mNewRev->getTitle();
677673 if( $this->mNewRev->isCurrent() ) {
678 - $newLink = $this->mNewPage->escapeLocalUrl();
 674+ $newLink = $this->mNewPage->escapeLocalUrl( 'oldid=' . $this->mNewid );
679675 $this->mPagetitle = htmlspecialchars( wfMsg( 'currentrev' ) );
680676 $newEdit = $this->mNewPage->escapeLocalUrl( 'action=edit' );
681677

Follow-up revisions

RevisionCommit summaryAuthorDate
r35844Reverted r35829, breaks the suppression of the "next diff" link ("newer edit"...tstarling03:31, 4 June 2008
r35845Add oldid like r35829, except without random unrelated changeaaron04:05, 4 June 2008

Status & tagging log