summaryrefslogtreecommitdiff
path: root/rt/share/html/REST/1.0/Forms/transaction/default
diff options
context:
space:
mode:
Diffstat (limited to 'rt/share/html/REST/1.0/Forms/transaction/default')
-rw-r--r--rt/share/html/REST/1.0/Forms/transaction/default14
1 files changed, 6 insertions, 8 deletions
diff --git a/rt/share/html/REST/1.0/Forms/transaction/default b/rt/share/html/REST/1.0/Forms/transaction/default
index 46488d23a..2e45f6707 100644
--- a/rt/share/html/REST/1.0/Forms/transaction/default
+++ b/rt/share/html/REST/1.0/Forms/transaction/default
@@ -2,7 +2,7 @@
%#
%# 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)
@@ -49,23 +49,20 @@
%#
<%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 ];
@@ -89,7 +86,7 @@ if ($tid) {
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 ];
}
@@ -107,7 +104,8 @@ if ($tid) {
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];
}