From: Alexandre Emsenhuber Date: Sat, 12 Apr 2008 18:20:05 +0000 (+0000) Subject: (bug 13705) Don't show rollback link in page history if called with dir=prev X-Git-Tag: 1.31.0-rc.0~48407 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/comptes/journal.php?a=commitdiff_plain;h=408e78359a4ebbbcbb787595b203a32d8404bfef;p=lhc%2Fweb%2Fwiklou.git (bug 13705) Don't show rollback link in page history if called with dir=prev --- 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