[Rt-commit] r12718 - in rt/branches/3.8-TESTING: lib/RT/Interface

alexmv at bestpractical.com alexmv at bestpractical.com
Wed May 28 15:50:07 EDT 2008


Author: alexmv
Date: Wed May 28 15:49:51 2008
New Revision: 12718

Modified:
   rt/branches/3.8-TESTING/   (props changed)
   rt/branches/3.8-TESTING/lib/RT/Interface/Web.pm

Log:
 r32244 at kohr-ah:  chmrr | 2008-05-28 15:47:47 -0400
  * Fix SkipSignatureOnly for text/html


Modified: rt/branches/3.8-TESTING/lib/RT/Interface/Web.pm
==============================================================================
--- rt/branches/3.8-TESTING/lib/RT/Interface/Web.pm	(original)
+++ rt/branches/3.8-TESTING/lib/RT/Interface/Web.pm	Wed May 28 15:49:51 2008
@@ -544,11 +544,11 @@
         delete $args{ARGSRef}->{'UpdateAttachments'};
     }
 
-    #Make the update content have no 'weird' newlines in it
     return () unless    $args{ARGSRef}->{'UpdateTimeWorked'}
                      || $args{ARGSRef}->{'UpdateAttachments'}
                      || $args{ARGSRef}->{'UpdateContent'};
 
+    #Make the update content have no 'weird' newlines in it
     $args{ARGSRef}->{'UpdateContent'} =~ s/\r+\n/\n/g if $args{ARGSRef}->{'UpdateContent'};
 
     # skip updates if the content contains only user's signature
@@ -556,7 +556,12 @@
     if ( $args{'SkipSignatureOnly'} ) {
         my $sig = $args{'TicketObj'}->CurrentUser->UserObj->Signature || '';
         $sig =~ s/^\s*|\s*$//g;
-        if ( $args{ARGSRef}->{'UpdateContent'} =~ /^\s*(--)?\s*\Q$sig\E\s*$/ ) {
+        if ($args{ARGSRef}->{'UpdateContent'} =~ /^\s*(--)?\s*\Q$sig\E\s*$/
+            or (    $args{ARGSRef}->{'UpdateContentType'} eq "text/html"
+                and $args{ARGSRef}->{'UpdateContent'}
+                =~ /^\s*<p>\s*(--)?\s*<br\s*\/?>\s*\Q$sig\E\s*<\/p>\s*$/ )
+            )
+        {
             return () unless $args{ARGSRef}->{'UpdateTimeWorked'} ||
                              $args{ARGSRef}->{'UpdateAttachments'};
 


More information about the Rt-commit mailing list