r50100 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r50099‎ | r50100 | r50101 >
Date:06:59, 1 May 2009
Author:tstarling
Status:deferred
Tags:
Comment:
Backported r48989, r48992: fix performance regression in Special:RecentChanges, O(N) query count.
Modified paths:
  • /branches/REL1_15/phase3 (modified) (history)
  • /branches/REL1_15/phase3/includes (modified) (history)
  • /branches/REL1_15/phase3/includes/ChangesList.php (modified) (history)
  • /branches/REL1_15/phase3/includes/api (modified) (history)
  • /branches/REL1_15/phase3/includes/specials (modified) (history)
  • /branches/REL1_15/phase3/includes/specials/SpecialRecentchanges.php (modified) (history)

Diff [purge]

Property changes on: branches/REL1_15/phase3/includes/api
___________________________________________________________________
Name: svn:mergeinfo
11 - /trunk/phase3/includes/api:48813-48814,48819,48836,48909,49051,49068,49086,49682,49775
22 + /trunk/phase3/includes/api:48813-48814,48819,48836,48909,48989,48992,49051,49068,49086,49682,49775
Index: branches/REL1_15/phase3/includes/ChangesList.php
@@ -326,8 +326,7 @@
327327 $page = $rc->getTitle();
328328 /** Check for rollback and edit permissions, disallow special pages, and only
329329 * show a link on the top-most revision */
330 - if( $page->quickUserCan('rollback') && $page->quickUserCan('edit')
331 - && $page->getLatestRevID() == $rc->mAttribs['rc_this_oldid'] )
 330+ if ($wgUser->isAllowed('rollback') && $rc->mAttribs['page_latest'] == $rc->mAttribs['rc_this_oldid'] )
332331 {
333332 $rev = new Revision( array(
334333 'id' => $rc->mAttribs['rc_this_oldid'],
Index: branches/REL1_15/phase3/includes/specials/SpecialRecentchanges.php
@@ -286,7 +286,10 @@
287287 $join_conds['watchlist'] = array('LEFT JOIN',
288288 "wl_user={$uid} AND wl_title=rc_title AND wl_namespace=rc_namespace");
289289 }
290 -
 290+ if ($wgUser->isAllowed("rollback")) {
 291+ $tables[] = 'page';
 292+ $join_conds['page'] = array('LEFT JOIN', 'rc_cur_id=page_id');
 293+ }
291294 // Tag stuff.
292295 $fields = array();
293296 // Fields are * in this case, so let the function modify an empty array to keep it happy.
Property changes on: branches/REL1_15/phase3/includes/specials
___________________________________________________________________
Name: svn:mergeinfo
294297 - /trunk/phase3/includes/specials:48836,48993,49051,49068,49086,49682,49775
/trunk/phase3/includes/specials/specials:48993
295298 + /trunk/phase3/includes/specials:48836,48989,48992-48993,49051,49068,49086,49682,49775
/trunk/phase3/includes/specials/specials:48993
Property changes on: branches/REL1_15/phase3/includes
___________________________________________________________________
Name: svn:mergeinfo
296299 - /trunk/phase3/includes:48836,49051,49068,49086,49682,49775
/trunk/phase3/includes/specials:48993
297300 + /trunk/phase3/includes:48836,48989,48992,49051,49068,49086,49682,49775
/trunk/phase3/includes/specials:48993
Property changes on: branches/REL1_15/phase3
___________________________________________________________________
Name: svn:mergeinfo
298301 - /trunk/phase3:48814,48836,48909,49051,49068,49086,49682,49775
299302 + /trunk/phase3:48814,48836,48909,48989,48992,49051,49068,49086,49682,49775

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r48989fix some of RC rollback madness:...midom11:02, 29 March 2009
r48992Aaron is lazy, but right :)midom11:14, 29 March 2009

Status & tagging log