r26505 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r26504‎ | r26505 | r26506 >
Date:15:50, 8 October 2007
Author:aaron
Status:old
Tags:
Comment:
*Don't show username line in queue if redundant
Modified paths:
  • /trunk/extensions/ConfirmAccount/ConfirmAccount_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ConfirmAccount/ConfirmAccount_body.php
@@ -26,13 +26,14 @@
2727 }
2828
2929 $this->setHeaders();
 30+
 31+ $this->mRealName = $wgRequest->getText( 'wpRealName' );
3032 # We may only want real names being used
3133 if( $wgUseRealNamesOnly )
32 - $this->mUsername = $wgRequest->getText( 'wpRealName' );
 34+ $this->mUsername = $this->mRealName;
3335 else
3436 $this->mUsername = $wgRequest->getText( 'wpUsername' );
35 - # Grab other info fields...
36 - $this->mRealName = $wgRequest->getText( 'wpRealName' );
 37+ # Other fields...
3738 $this->mEmail = $wgRequest->getText( 'wpEmail' );
3839 $this->mBio = $wgRequest->getText( 'wpBio', '' );
3940 $this->mNotes = $wgRequest->getText( 'wpNotes', '' );
@@ -691,7 +692,7 @@
692693 }
693694
694695 function formatRow( $row ) {
695 - global $wgLang, $wgUser;
 696+ global $wgLang, $wgUser, $wgUseRealNamesOnly;
696697
697698 $title = SpecialPage::getTitleFor( 'ConfirmAccounts' );
698699 if( $this->showRejects ) {
@@ -709,8 +710,10 @@
710711 $r .= ' <b>'.wfMsgExt( 'confirmaccount-reject', array('parseinline'), $row->user_name, $time ).'</b>';
711712 }
712713 $r .= '<br/><table cellspacing=\'1\' cellpadding=\'3\' border=\'1\' width=\'100%\'>';
713 - $r .= '<tr><td><strong>'.wfMsgHtml('confirmaccount-name').'</strong></td><td width=\'100%\'>' .
714 - htmlspecialchars($row->acr_name) . '</td></tr>';
 714+ if( !$wgUseRealNamesOnly ) {
 715+ $r .= '<tr><td><strong>'.wfMsgHtml('confirmaccount-name').'</strong></td><td width=\'100%\'>' .
 716+ htmlspecialchars($row->acr_name) . '</td></tr>';
 717+ }
715718 $r .= '<tr><td><strong>'.wfMsgHtml('confirmaccount-real').'</strong></td><td width=\'100%\'>' .
716719 htmlspecialchars($row->acr_real_name) . '</td></tr>';
717720 $econf = $row->acr_email_authenticated ? ' <strong>'.wfMsg('confirmaccount-econf').'</strong>' : '';

Status & tagging log