r24143 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r24142‎ | r24143 | r24144 >
Date:02:32, 16 July 2007
Author:aaron
Status:old
Tags:
Comment:
*Fix join query
Modified paths:
  • /trunk/extensions/ConfirmAccount/ConfirmAccount_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ConfirmAccount/ConfirmAccount_body.php
@@ -666,6 +666,7 @@
667667 $this->mForm = $form;
668668 $this->mConds = $conds;
669669 $this->mConds['acr_rejected'] = $rejects;
 670+ $this->rejects = $rejects;
670671 parent::__construct();
671672 }
672673
@@ -676,12 +677,17 @@
677678
678679 function getQueryInfo() {
679680 $conds = $this->mConds;
680 - $conds[] = 'acr_user = user_id';
681 -
 681+ $tables = array('account_requests');
 682+ $fields = array('acr_id','acr_name','acr_real_name','acr_registration',
 683+ 'acr_email','acr_email_authenticated','acr_bio','acr_notes','acr_urls');
 684+ if( $this->rejects ) {
 685+ $tables[] = 'user';
 686+ $conds[] = 'acr_user = user_id';
 687+ $fields[] = 'user_name';
 688+ }
682689 return array(
683 - 'tables' => array('account_requests','user'),
684 - 'fields' => 'acr_id,acr_name,acr_real_name,acr_registration,acr_email,acr_email_authenticated,
685 - acr_bio,acr_notes,acr_urls,acr_user,user_name',
 690+ 'tables' => $tables,
 691+ 'fields' => $fields,
686692 'conds' => $conds
687693 );
688694 }

Status & tagging log