فهرست منبع

make stanzas appear as a single message

Michael van Elst 23 سال پیش
والد
کامیت
8013912abc
1فایلهای تغییر یافته به همراه32 افزوده شده و 8 حذف شده
  1. 32 8
      rt/rt.patch

+ 32 - 8
rt/rt.patch

@@ -10,16 +10,40 @@
      return ($email);
      return ($email);
  }
  }
 --- html/Ticket/Elements/ShowMessageStanza.dist	Wed Apr  2 15:28:24 2003
 --- html/Ticket/Elements/ShowMessageStanza.dist	Wed Apr  2 15:28:24 2003
-+++ html/Ticket/Elements/ShowMessageStanza	Wed Apr  2 15:28:44 2003
-@@ -32,10 +32,9 @@
-         my $content = $stanza->{raw};
-         RT::Interface::Web::EscapeUTF8(\$content);
-         $m->comp('/Elements/Callback', content => \$content, %ARGS);
++++ html/Ticket/Elements/ShowMessageStanza	Wed Apr  2 17:23:30 2003
+@@ -22,21 +22,22 @@
+ %# 
+ %# END LICENSE BLOCK
+ <%perl>
+-foreach my $stanza (@$Message) {
+-    if ( ref $stanza eq "ARRAY" ) {
+-        $m->comp( 'ShowMessageStanza',
+-                  Depth   => $Depth + 1,
+-                  Message => $stanza );
++  { my $msg = '';
++    foreach my $stanza (@$Message) {
++        if ( ref $stanza eq "ARRAY" ) {
++            $m->comp( 'ShowMessageStanza',
++                      Depth   => $Depth + 1,
++                      Message => $stanza );
++        }
++        elsif ( ref $stanza eq "HASH" ) {
++            my $content = $stanza->{raw};
++            RT::Interface::Web::EscapeUTF8(\$content);
++            $m->comp('/Elements/Callback', content => \$content, %ARGS);
++            $msg .= "$content\n";
++           }
+     }
+-    elsif ( ref $stanza eq "HASH" ) {
+-        my $content = $stanza->{raw};
+-        RT::Interface::Web::EscapeUTF8(\$content);
+-        $m->comp('/Elements/Callback', content => \$content, %ARGS);
 -                $content =~ s/\n/<br>/gi;
 -                $content =~ s/\n/<br>/gi;
- 
+-
  </%perl>
  </%perl>
 -<font color="<%$colors[$Depth]%>"><%$content |n%><br></font>
 -<font color="<%$colors[$Depth]%>"><%$content |n%><br></font>
-+<font color="<%$colors[$Depth]%>"><pre><%$content |n%></pre><br></font>
- %       }
+-%       }
++<font color="<%$colors[$Depth]%>"><pre><%$msg |n%></pre><br></font>
  % }
  % }
  <%INIT>
  <%INIT>
+ use URI::URL;