(bug 13705) Don't show rollback link in page history if called with dir=prev
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sat, 12 Apr 2008 18:20:05 +0000 (18:20 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sat, 12 Apr 2008 18:20:05 +0000 (18:20 +0000)
RELEASE-NOTES
includes/PageHistory.php

index 8b35a6c..ada58b7 100644 (file)
@@ -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 ===
 
index b6edcaa..5a07e9a 100644 (file)
@@ -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