r39666 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r39665‎ | r39666 | r39667 >
Date:22:22, 19 August 2008
Author:brion
Status:old
Tags:
Comment:
Revert r39647 -- doesn't work, parameter is a User object not a name.
Please test things before committing them; SVN trunk is a working repository. Consistent application of broken code is not acceptable.
Modified paths:
  • /trunk/extensions/CheckUser/CheckUser.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CheckUser/CheckUser.php
@@ -201,13 +201,12 @@
202202 */
203203 function efUpdateCUEmailData( $to, $from, $subject, $text ) {
204204 global $wgSecretKey;
205 - if( !$wgSecretKey || $from->name == $to->name ) {
 205+ if( !$wgSecretKey ) {
206206 return true;
207207 }
208208 wfLoadExtensionMessages( 'CheckUser' );
209 - $userFrom = User::newFromName( $from->name );
210 - $userTo = User::newFromName( $to->name );
211 - $hash = md5( $userTo->getEmail() . $userTo->getId() . $wgSecretKey );
 209+ $user = User::newFromName( $to->name );
 210+ $hash = md5( $user->getEmail() . $user->getId() . $wgSecretKey );
212211 // Get IP
213212 $ip = wfGetIP();
214213 // Get XFF header
@@ -225,8 +224,8 @@
226225 'cuc_namespace' => NS_USER,
227226 'cuc_title' => '',
228227 'cuc_minor' => 0,
229 - 'cuc_user' => $userFrom->getId(),
230 - 'cuc_user_text' => $userFrom->getName(),
 228+ 'cuc_user' => $user->getId(),
 229+ 'cuc_user_text' => $user->getName(),
231230 'cuc_actiontext' => wfMsgForContent('checkuser-email-action',$hash),
232231 'cuc_comment' => '',
233232 'cuc_this_oldid' => 0,

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r39647bug fixesaaron16:26, 19 August 2008

Status & tagging log