From: Bartosz DziewoƄski Date: Fri, 12 Apr 2019 00:20:28 +0000 (+0200) Subject: HistoryPager: Unset 'date-range-to' parameter when paging X-Git-Tag: 1.34.0-rc.0~2025^2 X-Git-Url: http://git.cyclocoop.org//%27http:/jquery.khurshid.com/ifixpng.php/%27?a=commitdiff_plain;h=3e590a9f6ae643b53a073a701245a8b34f4424c4;p=lhc%2Fweb%2Fwiklou.git 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 --- 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