From 408e78359a4ebbbcbb787595b203a32d8404bfef Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Sat, 12 Apr 2008 18:20:05 +0000 Subject: [PATCH] (bug 13705) Don't show rollback link in page history if called with dir=prev --- RELEASE-NOTES | 1 + includes/PageHistory.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 8b35a6ca8f..ada58b7dfc 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -176,6 +176,7 @@ Special:EmailUser * (bug 13690) Fix PHP notice on accessing some URLs * Hide (undo) link if user isn't able to edit page * Invalidate cache of pages that includes images via redirects on upload +* (bug 13705) Don't show rollback link in page history if called with dir=prev === API changes in 1.13 === diff --git a/includes/PageHistory.php b/includes/PageHistory.php index b6edcaa4fa..5a07e9a2d0 100644 --- a/includes/PageHistory.php +++ b/includes/PageHistory.php @@ -611,7 +611,7 @@ class PageHistoryPager extends ReverseChronologicalPager { function formatRow( $row ) { if ( $this->mLastRow ) { - $latest = $this->mCounter == 1 && $this->mOffset == ''; + $latest = $this->mCounter == 1 && $this->mOffset == '' && !$this->mIsBackwards; $firstInList = $this->mCounter == 1; $s = $this->mPageHistory->historyLine( $this->mLastRow, $row, $this->mCounter++, $this->mPageHistory->getNotificationTimestamp(), $latest, $firstInList ); @@ -630,7 +630,7 @@ class PageHistoryPager extends ReverseChronologicalPager { function getEndBody() { if ( $this->mLastRow ) { - $latest = $this->mCounter == 1 && $this->mOffset == 0; + $latest = $this->mCounter == 1 && $this->mOffset == 0 && !$this->mIsBackwards; $firstInList = $this->mCounter == 1; if ( $this->mIsBackwards ) { # Next row is unknown, but for UI reasons, probably exists if an offset has been specified -- 2.20.1