From 8d502e61531155c3391a7d335d7d962cffdb0895 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Tue, 24 Feb 2009 22:13:18 +0000 Subject: [PATCH] * Added $wgUseTagFilter to control enabling of filter-by-change-tag --- RELEASE-NOTES | 1 + includes/ChangeTags.php | 11 ++++++++--- includes/DefaultSettings.php | 6 ++++++ 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 3baf7877f2..2c7d0eaa5e 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -118,6 +118,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * Add an ID if 'missingsummary' is triggered to allow styling of the summary line * Add logging to password resets if not resetting your own +* Added $wgUseTagFilter to control enabling of filter-by-change-tag === Bug fixes in 1.15 === * (bug 16968) Special:Upload no longer throws useless warnings. diff --git a/includes/ChangeTags.php b/includes/ChangeTags.php index cbbe67ef8a..9679aed2fb 100644 --- a/includes/ChangeTags.php +++ b/includes/ChangeTags.php @@ -91,7 +91,11 @@ class ChangeTags { * Needs $tables to be set up properly, so we can figure out which join conditions to use. */ static function modifyDisplayQuery( &$tables, &$fields, &$conds, &$join_conds, $filter_tag = false ) { - global $wgRequest; + global $wgRequest, $wgUseTagFilter; + + if( !$wgUseTagFilter ) { + return; + } if ($filter_tag === false) { $filter_tag = $wgRequest->getVal( 'tagfilter' ); @@ -129,8 +133,9 @@ class ChangeTags { * If $fullForm is true, it returns an entire form. */ static function buildTagFilterSelector( $selected='', $fullForm = false /* used to put a full form around the selector */ ) { - - if ( !count( self::listDefinedTags() ) ) + global $wgUseTagFilter; + + if ( !$wgUseTagFilter || !count( self::listDefinedTags() ) ) return $fullForm ? '' : array(); global $wgTitle; diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 40f88ae392..55d2b96650 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -3738,3 +3738,9 @@ $wgUseTwoButtonsSearchForm = true; * Preprocessor caching threshold */ $wgPreprocessorCacheThreshold = 1000; + +/** + * Allow filtering by change tag in recentchanges, history, etc + * Has no effect if no tags are defined in valid_tag. + */ +$wgUseTagFilter = true; -- 2.20.1