ImageHistoryPseudoPager: Don't ignore limit from URL
authorBartosz Dziewoński <matma.rex@gmail.com>
Sun, 11 Dec 2016 19:00:20 +0000 (20:00 +0100)
committerBartosz Dziewoński <matma.rex@gmail.com>
Sun, 11 Dec 2016 19:30:17 +0000 (20:30 +0100)
I thought the parent class would handle this for us, but no: our setLimit()
call has been overriding the limit from URL set in parent constructor.

Follow-up to f94d5239b528c406c85e090152805a1306e13ded.

Bug: T152813
Change-Id: I93762021f70613bfde72da1eb737e9fa32d7d97c

includes/page/ImageHistoryPseudoPager.php

index f4880d1..58f1666 100644 (file)
@@ -45,7 +45,9 @@ class ImageHistoryPseudoPager extends ReverseChronologicalPager {
 
                // Only display 10 revisions at once by default, otherwise the list is overwhelming
                $this->mLimitsShown = array_merge( [ 10 ], $this->mLimitsShown );
-               $this->setLimit( 10 );
+               $this->mDefaultLimit = 10;
+               list( $this->mLimit, /* $offset */ ) =
+                       $this->mRequest->getLimitOffset( $this->mDefaultLimit, '' );
        }
 
        /**