[Rt-commit] rt branch, 4.2/smime-v2, updated. rt-4.0.4-517-g3904b5d

Ruslan Zakirov ruz at bestpractical.com
Fri Jul 6 16:34:11 EDT 2012


The branch, 4.2/smime-v2 has been updated
       via  3904b5d4460561641d8d3f942722d036d836b45b (commit)
      from  23bdbd5bb4aa21d79c2e0519dfe9d299e11c3bf7 (commit)

Summary of changes:
 lib/RT/Interface/Web.pm | 4 ++--
 lib/RT/Ticket.pm        | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

- Log -----------------------------------------------------------------
commit 3904b5d4460561641d8d3f942722d036d836b45b
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Fri Jul 6 23:28:57 2012 +0300

    processes Sign/Encrypt values later on update
    
    Undef value is indication of "do whatever queue's options say".
    Code in Interface::Web was changed to fix some bug when value is not
    a boolean but an array (d3341b787e3a734c441596b84ce621339f327851).
    This was correct thing to do, but in a wrong place.
    
    Also, we don't need Encode now as we just turn value into ascii
    scalar without UTF8 flag.
    
    The bug shouldn't affect system unless admin wants to hide GnuPG
    widget that allows people to change crypt preferences on reply.

diff --git a/lib/RT/Interface/Web.pm b/lib/RT/Interface/Web.pm
index eefaab5..450e801 100644
--- a/lib/RT/Interface/Web.pm
+++ b/lib/RT/Interface/Web.pm
@@ -1587,8 +1587,8 @@ sub ProcessUpdateMessage {
     }
 
     my %message_args = (
-        Sign         => ( $args{ARGSRef}->{'Sign'} ? 1 : 0 ),
-        Encrypt      => ( $args{ARGSRef}->{'Encrypt'} ? 1 : 0 ),
+        Sign         => $args{ARGSRef}->{'Sign'},
+        Encrypt      => $args{ARGSRef}->{'Encrypt'},
         MIMEObj      => $Message,
         TimeTaken    => $args{ARGSRef}->{'UpdateTimeWorked'}
     );
diff --git a/lib/RT/Ticket.pm b/lib/RT/Ticket.pm
index 1cd3c7d..de14af0 100644
--- a/lib/RT/Ticket.pm
+++ b/lib/RT/Ticket.pm
@@ -2224,7 +2224,7 @@ sub _RecordNote {
 
     foreach my $argument (qw(Encrypt Sign)) {
         $args{'MIMEObj'}->head->replace(
-            "X-RT-$argument" => Encode::encode_utf8( $args{ $argument } )
+            "X-RT-$argument" => $args{ $argument } ? 1 : 0
         ) if defined $args{ $argument };
     }
 

-----------------------------------------------------------------------


More information about the Rt-commit mailing list