r47767 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r47766‎ | r47767 | r47768 >
Date:22:13, 24 February 2009
Author:brion
Status:resolved (Comments)
Tags:
Comment:
* Added $wgUseTagFilter to control enabling of filter-by-change-tag
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/ChangeTags.php (modified) (history)
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/ChangeTags.php
@@ -91,8 +91,12 @@
9292 * Needs $tables to be set up properly, so we can figure out which join conditions to use.
9393 */
9494 static function modifyDisplayQuery( &$tables, &$fields, &$conds, &$join_conds, $filter_tag = false ) {
95 - global $wgRequest;
 95+ global $wgRequest, $wgUseTagFilter;
9696
 97+ if( !$wgUseTagFilter ) {
 98+ return;
 99+ }
 100+
97101 if ($filter_tag === false) {
98102 $filter_tag = $wgRequest->getVal( 'tagfilter' );
99103 }
@@ -129,8 +133,9 @@
130134 * If $fullForm is true, it returns an entire form.
131135 */
132136 static function buildTagFilterSelector( $selected='', $fullForm = false /* used to put a full form around the selector */ ) {
133 -
134 - if ( !count( self::listDefinedTags() ) )
 137+ global $wgUseTagFilter;
 138+
 139+ if ( !$wgUseTagFilter || !count( self::listDefinedTags() ) )
135140 return $fullForm ? '' : array();
136141
137142 global $wgTitle;
Index: trunk/phase3/includes/DefaultSettings.php
@@ -3738,3 +3738,9 @@
37393739 * Preprocessor caching threshold
37403740 */
37413741 $wgPreprocessorCacheThreshold = 1000;
 3742+
 3743+/**
 3744+ * Allow filtering by change tag in recentchanges, history, etc
 3745+ * Has no effect if no tags are defined in valid_tag.
 3746+ */
 3747+$wgUseTagFilter = true;
Index: trunk/phase3/RELEASE-NOTES
@@ -118,6 +118,7 @@
119119 * Add an ID if 'missingsummary' is triggered to allow styling of the summary
120120 line
121121 * Add logging to password resets if not resetting your own
 122+* Added $wgUseTagFilter to control enabling of filter-by-change-tag
122123
123124 === Bug fixes in 1.15 ===
124125 * (bug 16968) Special:Upload no longer throws useless warnings.

Comments

#Comment by Brion VIBBER (talk | contribs)   22:20, 24 February 2009

Breakage in history. Some other code appears to be assuming fields will be added which aren't when the filter search is disabled.

#Comment by Brion VIBBER (talk | contribs)   22:43, 24 February 2009

Resolved by r47769

Status & tagging log