[Rt-commit] r5745 - rt/branches/3.6-RELEASE/lib/RT/Interface

ruz at bestpractical.com ruz at bestpractical.com
Wed Aug 9 15:37:29 EDT 2006


Author: ruz
Date: Wed Aug  9 15:37:28 2006
New Revision: 5745

Modified:
   rt/branches/3.6-RELEASE/lib/RT/Interface/Email.pm

Log:
* CullRTAddresses in RT::Interface::Email was using reversed filter logic

Modified: rt/branches/3.6-RELEASE/lib/RT/Interface/Email.pm
==============================================================================
--- rt/branches/3.6-RELEASE/lib/RT/Interface/Email.pm	(original)
+++ rt/branches/3.6-RELEASE/lib/RT/Interface/Email.pm	Wed Aug  9 15:37:28 2006
@@ -219,7 +219,7 @@
 =cut
 
 sub CullRTAddresses {
-    return ( grep { IsRTAddress($_) } @_ );
+    return grep !IsRTAddress($_), @_;
 }
 
 # }}}
@@ -297,7 +297,6 @@
     unless ($Val) {
 
         # Deal with the race condition of two account creations at once
-        #
         if ($Username) {
             $NewUser->LoadByName($Username);
         }
@@ -444,9 +443,8 @@
 
     my @Addresses = Mail::Address->parse($Addr);
 
-    my $AddrObj = $Addresses[0];
-
-    unless ( ref($AddrObj) ) {
+    my ($AddrObj) = grep ref $_, @Addresses;
+    unless ( $AddrObj ) {
         return ( undef, undef );
     }
 


More information about the Rt-commit mailing list