r113013 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r113012‎ | r113013 | r113014 >
Date:10:39, 5 March 2012
Author:hashar
Status:ok
Tags:
Comment:
Bug 18831 always use real name when available

Some failed logic made wikibugs to sometime override the real user name
with the mail user part.
Modified paths:
  • /trunk/tools/wikibugs/wikibugs (modified) (history)

Diff [purge]

Index: trunk/tools/wikibugs/wikibugs
@@ -69,10 +69,13 @@
7070 }
7171
7272 # Re-attempt to grab the "real name".
73 - if ( m{^(.*) <\S+\@\S+> changed:$}m ) {
 73+ if ( !$user && m{^(.*) <\S+\@\S+> changed:$}m ) {
7474 $haschanges = 1;
7575 $user = $1 if !$user;
76 - } else {
 76+ }
 77+
 78+ # Fallback to email address username
 79+ if( !$user ) {
7780 # If "real name" isn't available and we didn't get a user from the
7881 # comment header, just use the "X-Bugzilla-Who" header.
7982 my @who = split '@', $mail->header( 'X-Bugzilla-Who' );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r89717Fix Bug #18831 (“Wikibugs should use real name instead of e-mail...mah04:08, 8 June 2011
r92833Followup Bug #18831: Apply MZMcBride's patch do make the regex a...mah00:09, 22 July 2011

Status & tagging log