From 3e590a9f6ae643b53a073a701245a8b34f4424c4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bartosz=20Dziewo=C5=84ski?= Date: Fri, 12 Apr 2019 02:20:28 +0200 Subject: [PATCH] HistoryPager: Unset 'date-range-to' parameter when paging Follow-up to 1b27cee8979b2fefa65dafee237485787693eb98. This fixes paging on Special:History, and matches the existing behavior for the previously supported 'year'/'month' parameters. It is possible that this should be unset in IndexPager. However, in a quick test, other pagers that have filtering by date seem to function correctly already (tested Special:Contributions and Special:Log). I'm making this change in HistoryPager to avoid accidentally breaking anything, but perhaps this should be reevaluated. Maybe the real bug is that 'date-range-to' is not ignored when 'offset' is specified? Bug: T220781 Change-Id: I01c309178e6d5d9c919f410c64e2b833a5750141 --- includes/actions/pagers/HistoryPager.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/includes/actions/pagers/HistoryPager.php b/includes/actions/pagers/HistoryPager.php index 4e9d8e9b4f..c9c1b51a99 100644 --- a/includes/actions/pagers/HistoryPager.php +++ b/includes/actions/pagers/HistoryPager.php @@ -602,6 +602,15 @@ class HistoryPager extends ReverseChronologicalPager { } } + /** + * @inheritDoc + */ + function getDefaultQuery() { + parent::getDefaultQuery(); + unset( $this->mDefaultQuery['date-range-to'] ); + return $this->mDefaultQuery; + } + /** * This is called if a write operation is possible from the generated HTML * @param bool $enable -- 2.20.1