[rt-commit] [svn] r543 - rt/trunk/html/Ticket/Elements
jesse at fsck.com
jesse at fsck.com
Wed Mar 10 23:49:38 EST 2004
Author: jesse
Date: Wed Mar 10 23:49:38 2004
New Revision: 543
Modified:
rt/trunk/html/Ticket/Elements/ShowTransaction
Log:
#5334 : don't hide ticket updates for negative amounts of time
Modified: rt/trunk/html/Ticket/Elements/ShowTransaction
==============================================================================
--- rt/trunk/html/Ticket/Elements/ShowTransaction (original)
+++ rt/trunk/html/Ticket/Elements/ShowTransaction Wed Mar 10 23:49:38 2004
@@ -49,20 +49,31 @@
# localize the common headers (like 'Subject:'), too.
eval {$headers =~ s/^([^:]+)(?=:)/loc($1)/em; } # we eval here to catch errors when 5.6 panics
}
- # 13456 is a random # of about the biggest size we want to see inline text
- # It's here to catch anyone who hasn't updated RT_Config.pm since this
- # constant was moved out there.
+
+
my $MAX_INLINE_BODY = $RT::MaxInlineBody || 13456;
- if ($message->ContentType =~ m{^(text/plain|message|text$)}i &&
- $message->ContentLength < $MAX_INLINE_BODY ) {
- eval {
- require Text::Quoted;
- $quoted = Text::Quoted::extract($message->Content);
- };
+ if ( $message->ContentType =~ m{^(text/plain|message|text$)}i
+ && $message->ContentLength < $MAX_INLINE_BODY ) {
+
+ my $content;
+ # If we've preloaded all the content, let's pull from there
+ # if we haven't, load it now
+ if ($AttachmentContent->{$message->id}) {
+ $content = $AttachmentContent->{$message->id}->Content;
+ } else {
+ $content = $message->Content;
+ }
+
+
+
+ eval {
+ require Text::Quoted;
+ $quoted = Text::Quoted::extract( $content );
+ };
if ($@) {
- $quoted = $message->Content;
+ $quoted = $content;
}
- }
+ }
</%PERL>
<TR class="<% $RowNum%2 ? 'oddline' : 'evenline'%>" >
@@ -115,6 +126,7 @@
$RowNum => 1
$AttachPath => $RT::WebPath."/Ticket/Attachment"
$Attachments => undef
+$AttachmentContent => undef
</%ARGS>
<%INIT>
@@ -149,7 +161,7 @@
$TicketString = "Ticket ".$Transaction->Ticket .": ";
}
-if ($Transaction->TimeTaken > 0) {
+if ($Transaction->TimeTaken != 0) {
$TimeTaken = $Transaction->TimeTaken." min"
}
More information about the Rt-commit
mailing list