From f94d5239b528c406c85e090152805a1306e13ded Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bartosz=20Dziewo=C5=84ski?= Date: Fri, 25 Nov 2016 17:59:03 +0100 Subject: [PATCH] ImageHistoryPseudoPager: Only display 10 revisions at once by default This affects the "File history" section on file pages. Example: https://commons.wikimedia.org/wiki/File:07L_2010_5day.gif Suggested at the 2016 Wikimedia Community Wishlist Survey: https://meta.wikimedia.org/?curid=10125134#Allow_hiding_chosen_versions_of_images_on_File_page Change-Id: Ia2f39cd42e936f763d0117f47c333ca62402ebd4 --- includes/page/ImageHistoryPseudoPager.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/page/ImageHistoryPseudoPager.php b/includes/page/ImageHistoryPseudoPager.php index 6ab3ffc930..f4880d1dd4 100644 --- a/includes/page/ImageHistoryPseudoPager.php +++ b/includes/page/ImageHistoryPseudoPager.php @@ -42,6 +42,10 @@ class ImageHistoryPseudoPager extends ReverseChronologicalPager { $this->mImg = null; $this->mHist = []; $this->mRange = [ 0, 0 ]; // display range + + // Only display 10 revisions at once by default, otherwise the list is overwhelming + $this->mLimitsShown = array_merge( [ 10 ], $this->mLimitsShown ); + $this->setLimit( 10 ); } /** -- 2.20.1