r61625 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r61624‎ | r61625 | r61626 >
Date:08:57, 28 January 2010
Author:aaron
Status:ok
Tags:
Comment:
* Fixed $opts['tagfilter'] emptiness check
* Doc cleanup/spacing
Modified paths:
  • /trunk/phase3/includes/specials/SpecialRecentchanges.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialRecentchanges.php
@@ -293,22 +293,20 @@
294294 // Tag stuff.
295295 $fields = array();
296296 // Fields are * in this case, so let the function modify an empty array to keep it happy.
297 - ChangeTags::modifyDisplayQuery( $tables,
298 - $fields,
299 - $conds,
300 - $join_conds,
301 - $query_options,
302 - $opts['tagfilter']
303 - );
 297+ ChangeTags::modifyDisplayQuery(
 298+ $tables, $fields, $conds, $join_conds, $query_options, $opts['tagfilter']
 299+ );
304300
305301 wfRunHooks('SpecialRecentChangesQuery', array( &$conds, &$tables, &$join_conds, $opts ) );
306302
307 - // Is there either one namespace selected or excluded?
308 - // Tag filtering also has a better index.
309 - // Also, if this is "all" or main namespace, just use timestamp index.
 303+ // Don't use the new_namespace_time timestamp index if:
 304+ // (a) "All namespaces" selected
 305+ // (b) We want all pages NOT in a certain namespaces (inverted)
 306+ // (c) There is a tag to filter on (use tag index instead)
 307+ // (d) UNION + sort/limit is not an option for the DBMS
310308 if( is_null($namespace)
311309 || $invert
312 - || $opts['tagfilter']
 310+ || $opts['tagfilter'] != ''
313311 || !$dbr->unionSupportsOrderAndLimit() )
314312 {
315313 $res = $dbr->select( $tables, '*', $conds, __METHOD__,

Status & tagging log