Tweak for r33190: simply show rollback link if there's no previous revision. Thanks...
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sun, 13 Apr 2008 15:05:32 +0000 (15:05 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sun, 13 Apr 2008 15:05:32 +0000 (15:05 +0000)
includes/PageHistory.php

index 5a07e9a..7659c69 100644 (file)
@@ -611,7 +611,7 @@ class PageHistoryPager extends ReverseChronologicalPager {
 
        function formatRow( $row ) {
                if ( $this->mLastRow ) {
-                       $latest = $this->mCounter == 1 && $this->mOffset == '' && !$this->mIsBackwards;
+                       $latest = $this->mCounter == 1 && $this->mIsFirst;
                        $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 && !$this->mIsBackwards;
+                       $latest = $this->mCounter == 1 && $this->mIsFirst;
                        $firstInList = $this->mCounter == 1;
                        if ( $this->mIsBackwards ) {
                                # Next row is unknown, but for UI reasons, probably exists if an offset has been specified