[Rt-commit] [rtir] 01/03: Check for defined object before calling isa
Jim Brandt
jbrandt at bestpractical.com
Wed Jun 4 15:21:19 EDT 2014
This is an automated email from the git hooks/post-receive script.
jbrandt pushed a commit to branch 3.2/makeclicky-on-lookup
in repository rtir.
commit ceee8a9dab25586dd2191f2cc494975cb0f40482
Author: Jim Brandt <jbrandt at bestpractical.com>
Date: Fri May 9 11:09:36 2014 -0400
Check for defined object before calling isa
With the previous ordering, lookups that passed no object
errored when attempting the isa call. Add a name to the
whois form to make testing easier.
The isa call still runs the queue lookup code only on tickets
as noted in d58c1bad8c .
---
html/Callbacks/RTIR/Elements/MakeClicky/Default | 4 ++--
html/RTIR/Tools/Elements/ToolFormWhois | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/html/Callbacks/RTIR/Elements/MakeClicky/Default b/html/Callbacks/RTIR/Elements/MakeClicky/Default
index 68b6b3e..74e5ebf 100644
--- a/html/Callbacks/RTIR/Elements/MakeClicky/Default
+++ b/html/Callbacks/RTIR/Elements/MakeClicky/Default
@@ -220,8 +220,8 @@ my $handle = ${$ARGS{handle}};
${$ARGS{handle}} = sub {
my %args = @_;
- if ($args{object}->isa('RT::Ticket')) {
- if ( $args{object} ) {
+ if ($args{object}) {
+ if ( $args{object}->isa('RT::Ticket') ) {
$args{type} = RT::IR::TicketType( Queue => $args{object}->QueueObj->Name );
$args{incident} = $args{ticket}->id
diff --git a/html/RTIR/Tools/Elements/ToolFormWhois b/html/RTIR/Tools/Elements/ToolFormWhois
index d011bc0..c82adcd 100644
--- a/html/RTIR/Tools/Elements/ToolFormWhois
+++ b/html/RTIR/Tools/Elements/ToolFormWhois
@@ -45,7 +45,7 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<form action="Lookup.html" method="get">
+<form name="ToolFormWhois" action="Lookup.html" method="get">
% foreach my $arg ( grep exists $ARGS{$_}, @PassArguments ) {
<input type="hidden" name="<% $arg %>" value="<% $ARGS{ $arg } %>" />
% }
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the rt-commit
mailing list