%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
$fields => undef
</%ARGS>
<%INIT>
-my $ticket = new RT::Ticket $session{CurrentUser};
+my $ticket = RT::Ticket->new($session{CurrentUser});
my ($c, $o, $k, $e) = ("", [], {}, "");
$ticket->Load($id);
if ($tid) {
my @data;
- my $t = new RT::Transaction $session{CurrentUser};
+ my $t = RT::Transaction->new($session{CurrentUser});
# this paragraph limits the transaction ID query to transactions on this ticket.
# Otherwise you can query any transaction from any ticket, which makes no sense.
if (!%$fields || exists $fields->{lc 'Content'}) {
- my $creator = new RT::User $session{CurrentUser};
+ my $creator = RT::User->new($session{CurrentUser});
$creator->Load($t->Creator);
push @data, [ Creator => $creator->Name ];
}
my $size = length($a->Content||'');
if ($size > 1024) { $size = int($size/102.4)/10 . "k" }
else { $size .= "b" }
- $attachlist .= "\n" . $a->Id.": ".($a->Filename || "untitled")." (".$size.")";
+ my $name = (defined $a->Filename and length $a->Filename) ? $a->Filename : "untitled";
+ $attachlist .= "\n" . $a->Id.": $name ($size)";
}
push @data, [Attachments => $attachlist];