Catrope has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/365431 )

Change subject: ChangeTags: Remove $wgRequest abuse in modifyDisplayQuery()
......................................................................

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
---
M includes/changetags/ChangeTags.php
1 file changed, 3 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/31/365431/1

diff --git a/includes/changetags/ChangeTags.php 
b/includes/changetags/ChangeTags.php
index afcc90f..2939e4b 100644
--- a/includes/changetags/ChangeTags.php
+++ b/includes/changetags/ChangeTags.php
@@ -654,17 +654,13 @@
         * @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;
 
                // Figure out which ID field to use
                if ( in_array( 'recentchanges', (array)$tables ) ) {

-- 
To view, visit https://gerrit.wikimedia.org/r/365431
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib5d1b9f90989903f99a0d163745879df24f45b6a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Catrope <r...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to