From 91026c2542671a06103cb3c1b7869d411a178795 Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Wed, 1 Sep 2010 14:16:23 +0000 Subject: [PATCH] Don't show "older edit" when no older edit available. Based on patch by Umherirrender --- RELEASE-NOTES | 1 + includes/diff/DifferenceInterface.php | 28 +++++++++++++++------------ 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 90532746f9..b3f45dc664 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -310,6 +310,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN when a resource limit such as $wgMaxShellMemory is hit. * (bug 24981) Allow extensions to access SpecialUpload variables again * (bug 20744) Wiki forgets about an uploaded file +* (bug 17913) Don't show "older edit" when no older edit available === API changes in 1.17 === * (bug 22738) Allow filtering by action type on query=logevent. diff --git a/includes/diff/DifferenceInterface.php b/includes/diff/DifferenceInterface.php index 9cbee31a09..3b7e3ed97f 100644 --- a/includes/diff/DifferenceInterface.php +++ b/includes/diff/DifferenceInterface.php @@ -277,18 +277,22 @@ CONTROL; if( $this->unhide ) { $query['unhide'] = 1; } - $prevlink = $sk->link( - $this->mTitle, - wfMsgHtml( 'previousdiff' ), - array( - 'id' => 'differences-prevlink' - ), - $query, - array( - 'known', - 'noclasses' - ) - ); + if( !$this->mOldRev->getPrevious() ) { + $prevlink = ' '; + } else { + $prevlink = $sk->link( + $this->mTitle, + wfMsgHtml( 'previousdiff' ), + array( + 'id' => 'differences-prevlink' + ), + $query, + array( + 'known', + 'noclasses' + ) + ); + } # Make "next revision link" $query['diff'] = 'next'; -- 2.20.1