From 9228cb1620e1601d03ff93df5d2d05bcc202b906 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Fri, 14 Jul 2017 19:49:10 -0700 Subject: [PATCH] ChangeTags: Remove $wgRequest abuse in modifyDisplayQuery() If you omitted the $filter_tag parameter or set it to false, this would go grab the 'tagfilter' query string parameter from $wgRequest and use it instead. Thankfully no callers (in core or extensions) used this scary misfeature, so we can just remove it. Change-Id: Ib5d1b9f90989903f99a0d163745879df24f45b6a --- includes/changetags/ChangeTags.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/includes/changetags/ChangeTags.php b/includes/changetags/ChangeTags.php index 6ea4812e3e..2eb9b225d5 100644 --- a/includes/changetags/ChangeTags.php +++ b/includes/changetags/ChangeTags.php @@ -654,17 +654,13 @@ class ChangeTags { * @param string|array $conds Conditions used in query, see Database::select * @param array $join_conds Join conditions, see Database::select * @param string|array $options Options, see Database::select - * @param bool|string|array $filter_tag Tag(s) to select on + * @param string|array $filter_tag Tag(s) to select on * * @throws MWException When unable to determine appropriate JOIN condition for tagging */ public static function modifyDisplayQuery( &$tables, &$fields, &$conds, - &$join_conds, &$options, $filter_tag = false ) { - global $wgRequest, $wgUseTagFilter; - - if ( $filter_tag === false ) { - $filter_tag = $wgRequest->getVal( 'tagfilter' ); - } + &$join_conds, &$options, $filter_tag = '' ) { + global $wgUseTagFilter; // Normalize to arrays $tables = (array)$tables; -- 2.20.1