r83845 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r83844‎ | r83845 | r83846 >
Date:18:23, 13 March 2011
Author:reedy
Status:resolved (Comments)
Tags:
Comment:
Join user table to recentchanges on user id, rather than user_text

Add some documentation
Modified paths:
  • /trunk/phase3/includes/specials/SpecialActiveusers.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialActiveusers.php
@@ -32,6 +32,16 @@
3333 */
3434 class ActiveUsersPager extends UsersPager {
3535
 36+ /**
 37+ * @var FormOptions
 38+ */
 39+ protected $opts;
 40+
 41+ /**
 42+ * @var Array
 43+ */
 44+ protected $groups;
 45+
3646 function __construct( $group = null ) {
3747 global $wgRequest, $wgActiveUserDays;
3848 $this->RCMaxAge = $wgActiveUserDays;
@@ -96,7 +106,7 @@
97107 'USE INDEX' => array( 'recentchanges' => 'rc_user_text' )
98108 ),
99109 'join_conds' => array(
100 - 'user' => array( 'INNER JOIN', 'rc_user_text=user_name' ),
 110+ 'user' => array( 'INNER JOIN', 'rc_user=user_id' ),
101111 'ipblocks' => array( 'LEFT JOIN', 'user_id=ipb_user AND ipb_auto=0 AND ipb_deleted=1' ),
102112 ),
103113 'conds' => $conds

Follow-up revisions

RevisionCommit summaryAuthorDate
r83880Partial revert r83845, use indexed fields for joinreedy11:05, 14 March 2011

Comments

#Comment by Catrope (talk | contribs)   09:22, 14 March 2011

There was a reason for joining on rc_user_text instead of rc_user: there's an index on the former but none on the latter.

Status & tagging log