[Rt-commit] rt branch, 4.2/crontool-template-obj, created. rt-4.2.5-15-geb37bdf
Jim Brandt
jbrandt at bestpractical.com
Fri Jun 13 14:30:00 EDT 2014
The branch, 4.2/crontool-template-obj has been created
at eb37bdfcdf605046380e3a7ef163f1812cca0fd3 (commit)
- Log -----------------------------------------------------------------
commit eb37bdfcdf605046380e3a7ef163f1812cca0fd3
Author: Jim Brandt <jbrandt at bestpractical.com>
Date: Fri Jun 13 14:26:14 2014 -0400
Rename template object variable
The fix in b6efaa8ef removed caching and loaded a template
object, but the variable name $template used for the object
overwrote the initial $template variable which had the
template id/name. Rename to $template_obj.
diff --git a/bin/rt-crontool.in b/bin/rt-crontool.in
index 45c5163..db2cb04 100644
--- a/bin/rt-crontool.in
+++ b/bin/rt-crontool.in
@@ -259,11 +259,11 @@ sub get_template {
unless ( $template =~ /\D/ ) {
# by id
- my $template = RT::Template->new( RT->SystemUser );
- $template->Load( $template );
+ my $template_obj = RT::Template->new( RT->SystemUser );
+ $template_obj->Load( $template );
die "Failed to load template '$template'"
- unless $template->id;
- return $template;
+ unless $template_obj->id;
+ return $template_obj;
}
my $queue = $ticket->Queue;
-----------------------------------------------------------------------
More information about the rt-commit
mailing list