%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
my $output;
my $status = "200 Ok";
-my $ticket = new RT::Ticket $session{CurrentUser};
+my $ticket = RT::Ticket->new($session{CurrentUser});
my $object = $r->path_info;
my @fields = qw(DependsOn DependedOnBy RefersTo ReferredToBy HasMember MemberOf);
goto OUTPUT;
}
$id ||= $object;
-unless ($id =~ /^\d+$/ && $to =~ /^\d+$/) {
- my $bad = ($id !~ /^\d+$/) ? $id : $to;
+unless ($id =~ /^\d+$/) {
$output = $r->path_info. "\n";
- $output .= "Invalid ticket id: '$bad'.\n";
+ $output .= "Invalid ticket id: '$id'.\n";
$status = "400 Bad Request";
goto OUTPUT;
}