Index: branches/wmf/1.16wmf4/docs/hooks.txt |
— | — | @@ -1486,12 +1486,13 @@ |
1487 | 1487 | $opts: FormOptions for this request |
1488 | 1488 | |
1489 | 1489 | 'SpecialRecentChangesQuery': called when building sql query for |
1490 | | -SpecialRecentChanges |
| 1490 | +SpecialRecentChanges and SpecialRecentChangesLinked |
1491 | 1491 | &$conds: array of WHERE conditionals for query |
1492 | 1492 | &$tables: array of tables to be queried |
1493 | 1493 | &$join_conds: join conditions for the tables |
1494 | 1494 | $opts: FormOptions for this request |
1495 | 1495 | &$query_options: array of options for the database request |
| 1496 | +&$select: String '*' or array of columns to select |
1496 | 1497 | |
1497 | 1498 | 'SpecialSearchNogomatch': called when user clicked the "Go" button but the |
1498 | 1499 | target doesn't exist |
Index: branches/wmf/1.16wmf4/includes/specials/SpecialRecentchangeslinked.php |
— | — | @@ -92,8 +92,8 @@ |
93 | 93 | ChangeTags::modifyDisplayQuery( $tables, $select, $conds, $join_conds, |
94 | 94 | $query_options, $opts['tagfilter'] ); |
95 | 95 | |
96 | | - // XXX: parent class does this, should we too? |
97 | | - // wfRunHooks('SpecialRecentChangesQuery', array( &$conds, &$tables, &$join_conds, $opts ) ); |
| 96 | + if ( !wfRunHooks( 'SpecialRecentChangesQuery', array( &$conds, &$tables, &$join_conds, $opts, &$query_options, &$select ) ) ) |
| 97 | + return false; |
98 | 98 | |
99 | 99 | if( $ns == NS_CATEGORY && !$showlinkedto ) { |
100 | 100 | // special handling for categories |
Index: branches/wmf/1.16wmf4/includes/specials/SpecialRecentchanges.php |
— | — | @@ -290,6 +290,7 @@ |
291 | 291 | $dbr = wfGetDB( DB_SLAVE ); |
292 | 292 | $limit = $opts['limit']; |
293 | 293 | $namespace = $opts['namespace']; |
| 294 | + $select = '*'; |
294 | 295 | $invert = $opts['invert']; |
295 | 296 | |
296 | 297 | // JOIN on watchlist for users |
— | — | @@ -309,7 +310,7 @@ |
310 | 311 | $tables, $fields, $conds, $join_conds, $query_options, $opts['tagfilter'] |
311 | 312 | ); |
312 | 313 | |
313 | | - if ( !wfRunHooks( 'SpecialRecentChangesQuery', array( &$conds, &$tables, &$join_conds, $opts, &$query_options ) ) ) |
| 314 | + if ( !wfRunHooks( 'SpecialRecentChangesQuery', array( &$conds, &$tables, &$join_conds, $opts, &$query_options, &$select ) ) ) |
314 | 315 | return false; |
315 | 316 | |
316 | 317 | // Don't use the new_namespace_time timestamp index if: |
— | — | @@ -329,7 +330,7 @@ |
330 | 331 | // We have a new_namespace_time index! UNION over new=(0,1) and sort result set! |
331 | 332 | } else { |
332 | 333 | // New pages |
333 | | - $sqlNew = $dbr->selectSQLText( $tables, '*', |
| 334 | + $sqlNew = $dbr->selectSQLText( $tables, $select, |
334 | 335 | array( 'rc_new' => 1 ) + $conds, |
335 | 336 | __METHOD__, |
336 | 337 | array( 'ORDER BY' => 'rc_timestamp DESC', 'LIMIT' => $limit, |
Property changes on: branches/wmf/1.16wmf4 |
___________________________________________________________________ |
Modified: svn:mergeinfo |
337 | 338 | Merged /trunk/phase3:r70559,71970 |