r89718 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89717‎ | r89718 | r89719 >
Date:04:34, 8 June 2011
Author:mah
Status:deferred
Tags:
Comment:
followup r89717 with fixes after testing a couple of couple of cases
w/o a “real name”
Modified paths:
  • /trunk/tools/wikibugs/wikibugs (modified) (history)

Diff [purge]

Index: trunk/tools/wikibugs/wikibugs
@@ -53,19 +53,21 @@
5454 for ($body) {
5555 # Use fancy lookahead magic to match comments in the form of
5656 # "Foo <bar@baz.com>" or "bing@boop.com".
57 - if ( m{^--- Comment #\d+ from (.+) <\S+\@.*}m ) {
 57+ if ( m{^--- Comment #\d+ from (.*) ?<?\S+\@.*}m ) {
5858 $user = $1;
59 - } elsif ( m{^(.*) <(\S+)\@\S+> changed:$}m ) {
 59+ $haschanges = 1;
 60+ $comment = 1;
 61+ }
 62+ if ( m{^(.*) ?<?(\S+)\@\S+>? changed:$}m ) {
6063 # Try to grab the "real name" again.
6164 $haschanges = 1;
62 - $user = $1;
 65+ $user = $1 if !$user;
6366 } else {
6467 # If "real name" isn't available and we didn't get a user from the
6568 # comment header, just use the "X-Bugzilla-Who" header.
6669 my @who = split '@', $mail->header( 'X-Bugzilla-Who' );
6770 $user = $who[0];
6871 }
69 - $comment = s/^--- Comment #\d+ from (?-s:.*?<)?(\S+)\@.*//ms;
7072 }
7173
7274 my @changed_fields = split /\s+/, $mail->header( 'X-Bugzilla-Changed-Fields' );
@@ -161,7 +163,7 @@
162164 if ($output)
163165 {
164166 open (OUT, ">>/var/wikibugs/wikibugs.log");
165 - # print $output;
 167+ #print $output;
166168 print OUT $output;
167169 close OUT;
168170 }

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

Status & tagging log