%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
%#
<%ARGS>
$id
-$args => undef
$format => undef
$fields => undef
</%ARGS>
<%INIT>
-my $trans = new RT::Transactions $session{CurrentUser};
+my $trans = RT::Transactions->new($session{CurrentUser});
my ($c, $o, $k, $e) = ("", [], {} , "");
-chomp $args;
-my @arglist = split('/', $args);
my $tid = $id;
$trans->Limit(FIELD => 'Id', OPERATOR => '=', VALUE => $tid);
if ($tid) {
my @data;
- my $t = new RT::Transaction $session{CurrentUser};
+ my $t = RT::Transaction->new($session{CurrentUser});
$t->Load($tid);
if ($format eq "l") {
push @data, [ id => $t->Id ];
if (!%$fields || exists $fields->{lc 'Content'});
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 ];
}
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];
}