From: Bartosz DziewoƄski Date: Sun, 11 Dec 2016 19:00:20 +0000 (+0100) Subject: ImageHistoryPseudoPager: Don't ignore limit from URL X-Git-Tag: 1.31.0-rc.0~4618^2 X-Git-Url: http://git.cyclocoop.org/%22.%28%24lien.?a=commitdiff_plain;h=9142ec1629fc8ba6b7261a06143342c4fad9b254;p=lhc%2Fweb%2Fwiklou.git 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 --- 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, '' ); } /**