* Added $wgUseTagFilter to control enabling of filter-by-change-tag
authorBrion Vibber <brion@users.mediawiki.org>
Tue, 24 Feb 2009 22:13:18 +0000 (22:13 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Tue, 24 Feb 2009 22:13:18 +0000 (22:13 +0000)
RELEASE-NOTES
includes/ChangeTags.php
includes/DefaultSettings.php

index 3baf787..2c7d0ea 100644 (file)
@@ -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.
index cbbe67e..9679aed 100644 (file)
@@ -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;
index 40f88ae..55d2b96 100644 (file)
@@ -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;