[Rt-commit] r7574 - in rt/branches/3.7-EXPERIMENTAL: .

ruz at bestpractical.com ruz at bestpractical.com
Thu Apr 19 17:49:54 EDT 2007


Author: ruz
Date: Thu Apr 19 17:49:53 2007
New Revision: 7574

Modified:
   rt/branches/3.7-EXPERIMENTAL/   (props changed)
   rt/branches/3.7-EXPERIMENTAL/lib/RT/Crypt/GnuPG.pm

Log:
 r5001 at cubic-pc:  cubic | 2007-04-20 01:37:12 +0400
 * minor


Modified: rt/branches/3.7-EXPERIMENTAL/lib/RT/Crypt/GnuPG.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/RT/Crypt/GnuPG.pm	(original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/RT/Crypt/GnuPG.pm	Thu Apr 19 17:49:53 2007
@@ -774,7 +774,7 @@
 
     my @res;
     my (%user_hint, $latest_user_main_key);
-    for( my $i = 0; $i < @status; $i++ ) {
+    for ( my $i = 0; $i < @status; $i++ ) {
         my $line = $status[$i];
         my ($keyword, $args) = ($line =~ /^(\S+)\s*(.*)$/s);
         if ( $simple_keyword{ $keyword } ) {
@@ -860,8 +860,7 @@
                 KeyLength => $key_length,
                 Algorithm => $alg,
             );
-            $user_hint{ $key } ||= {};
-            $res{'User'} = $user_hint{ $key };
+            $res{'User'} = ( $user_hint{ $key } ||= {} );
             push @res, \%res;
         }
         elsif ( $keyword eq 'NO_SECKEY' || $keyword eq 'NO_PUBKEY' ) {
@@ -873,8 +872,7 @@
                 Message   => ucfirst( $type ) ." key '0x$key' is not available",
                 Key       => $key,
             );
-            $user_hint{ $key } ||= {};
-            $res{'User'} = $user_hint{ $key };
+            $res{'User'} = ( $user_hint{ $key } ||= {} );
             push @res, \%res;
         }
         # GOODSIG, BADSIG, VALIDSIG, TRUST_*
@@ -958,12 +956,12 @@
             my ($rcode, $recipient) = split /\s+/, $args, 2;
             my $reason = ReasonCodeToText( $keyword, $rcode );
             push @res, {
-                Operation => 'RecipientsCheck',
-                Status  => 'ERROR',
-                Message => "Recipient '$recipient' is unusable, the reason is '$reason'",
-                Recipient => $recipient,
+                Operation  => 'RecipientsCheck',
+                Status     => 'ERROR',
+                Message    => "Recipient '$recipient' is unusable, the reason is '$reason'",
+                Recipient  => $recipient,
                 ReasonCode => $rcode,
-                Reason => $reason,
+                Reason     => $reason,
             };
         }
         elsif ( $keyword eq 'NODATA' ) {


More information about the Rt-commit mailing list