r76679 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r76678‎ | r76679 | r76680 >
Date:08:34, 15 November 2010
Author:robla
Status:ok (Comments)
Tags:
Comment:
MFT r70559, r71970 (SpecialRecentChangesQuery changes)
Modified paths:
  • /branches/chad-pre-wmf-merge/docs/hooks.txt (modified) (history)
  • /branches/chad-pre-wmf-merge/includes/specials/SpecialRecentchanges.php (modified) (history)
  • /branches/chad-pre-wmf-merge/includes/specials/SpecialRecentchangeslinked.php (modified) (history)

Diff [purge]

Index: branches/chad-pre-wmf-merge/docs/hooks.txt
@@ -1492,6 +1492,7 @@
14931493 &$join_conds: join conditions for the tables
14941494 $opts: FormOptions for this request
14951495 &$query_options: array of options for the database request
 1496+&$select: String '*' or array of columns to select
14961497
14971498 'SpecialSearchNogomatch': called when user clicked the "Go" button but the
14981499 target doesn't exist
Property changes on: branches/chad-pre-wmf-merge/docs/hooks.txt
___________________________________________________________________
Added: svn:mergeinfo
14991500 Merged /branches/wmf-deployment/docs/hooks.txt:r60970
15001501 Merged /trunk/phase3/docs/hooks.txt:r63545-63546,63549,63643,63764,63897-63901,64113,64509,65387,65391,65555,65590,65650,65816,71970,75332,75481
Index: branches/chad-pre-wmf-merge/includes/specials/SpecialRecentchangeslinked.php
@@ -92,8 +92,8 @@
9393 ChangeTags::modifyDisplayQuery( $tables, $select, $conds, $join_conds,
9494 $query_options, $opts['tagfilter'] );
9595
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;
9898
9999 if( $ns == NS_CATEGORY && !$showlinkedto ) {
100100 // special handling for categories
Property changes on: branches/chad-pre-wmf-merge/includes/specials/SpecialRecentchangeslinked.php
___________________________________________________________________
Added: svn:mergeinfo
101101 Merged /branches/REL1_15/phase3/includes/specials/SpecialRecentchangeslinked.php:r51646
102102 Merged /branches/sqlite/includes/specials/SpecialRecentchangeslinked.php:r58211-58321
103103 Merged /trunk/phase3/includes/specials/SpecialRecentchangeslinked.php:r63045,63047,63549,63764,63897-63901,64846,64860,64862,70559,71059,71098,71970
104104 Merged /branches/wmf-deployment/includes/specials/SpecialRecentchangeslinked.php:r53381,56967,60970
Index: branches/chad-pre-wmf-merge/includes/specials/SpecialRecentchanges.php
@@ -290,6 +290,7 @@
291291 $dbr = wfGetDB( DB_SLAVE );
292292 $limit = $opts['limit'];
293293 $namespace = $opts['namespace'];
 294+ $select = '*';
294295 $invert = $opts['invert'];
295296
296297 // JOIN on watchlist for users
@@ -309,7 +310,7 @@
310311 $tables, $fields, $conds, $join_conds, $query_options, $opts['tagfilter']
311312 );
312313
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 ) ) )
314315 return false;
315316
316317 // Don't use the new_namespace_time timestamp index if:
@@ -329,7 +330,7 @@
330331 // We have a new_namespace_time index! UNION over new=(0,1) and sort result set!
331332 } else {
332333 // New pages
333 - $sqlNew = $dbr->selectSQLText( $tables, '*',
 334+ $sqlNew = $dbr->selectSQLText( $tables, $select,
334335 array( 'rc_new' => 1 ) + $conds,
335336 __METHOD__,
336337 array( 'ORDER BY' => 'rc_timestamp DESC', 'LIMIT' => $limit,
Property changes on: branches/chad-pre-wmf-merge/includes/specials/SpecialRecentchanges.php
___________________________________________________________________
Added: svn:mergeinfo
337338 Merged /branches/wmf-deployment/includes/specials/SpecialRecentchanges.php:r53381,56967,60970
338339 Merged /branches/REL1_15/phase3/includes/specials/SpecialRecentchanges.php:r51646
339340 Merged /branches/sqlite/includes/specials/SpecialRecentchanges.php:r58211-58321
340341 Merged /trunk/phase3/includes/specials/SpecialRecentchanges.php:r63045,63047,63549,63764,63897-63901,64846,64860,64862,71059,71098,71970

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r70559(bug 22514) SpecialRecentChangesQuery should also work on Special:RecentChang...demon13:07, 6 August 2010
r71970Tweak SpecialRecentChangesQuery hook. Need to be able to modify selected fiel...demon19:07, 30 August 2010

Comments

#Comment by 😂 (talk | contribs)   12:11, 15 November 2010

I didn't grab these changes here already? Epic fail on my part...

I know I merged them to 1.16wmf4 already.

#Comment by RobLa-WMF (talk | contribs)   17:36, 15 November 2010

Yeah, I noticed r76485 after I checked this in. After that, I did a diff against 1.16wmf4; the only other change we're missing is Roan's profile hack (r76243), which clearly shouldn't cause us any problems.

Status & tagging log