From: Roan Kattouw Date: Sat, 15 Jul 2017 02:49:10 +0000 (-0700) Subject: ChangeTags: Remove $wgRequest abuse in modifyDisplayQuery() X-Git-Tag: 1.31.0-rc.0~2587^2 X-Git-Url: http://git.cyclocoop.org/%22.%24h.%22?a=commitdiff_plain;h=9228cb1620e1601d03ff93df5d2d05bcc202b906;p=lhc%2Fweb%2Fwiklou.git 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 --- 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;