From: Chad Horohoe Date: Wed, 1 Sep 2010 14:16:23 +0000 (+0000) Subject: Don't show "older edit" when no older edit available. Based on patch by Umherirrender X-Git-Tag: 1.31.0-rc.0~35250 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=91026c2542671a06103cb3c1b7869d411a178795;p=lhc%2Fweb%2Fwiklou.git Don't show "older edit" when no older edit available. Based on patch by Umherirrender --- 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';