From 9142ec1629fc8ba6b7261a06143342c4fad9b254 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bartosz=20Dziewo=C5=84ski?= Date: Sun, 11 Dec 2016 20:00:20 +0100 Subject: [PATCH] ImageHistoryPseudoPager: Don't ignore limit from URL 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 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/page/ImageHistoryPseudoPager.php b/includes/page/ImageHistoryPseudoPager.php index f4880d1dd4..58f1666842 100644 --- a/includes/page/ImageHistoryPseudoPager.php +++ b/includes/page/ImageHistoryPseudoPager.php @@ -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, '' ); } /** -- 2.20.1