X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Fbin%2Frt-crontool;h=be189b5ce094e79dcb78018929a2c3125e1968ec;hb=ed1f84b4e8f626245995ecda5afcf83092c153b2;hp=e58bafce8cce8dde694f03814556f5b1ab426e6c;hpb=43a06151e47d2c59b833cbd8c26d97865ee850b6;p=freeside.git diff --git a/rt/bin/rt-crontool b/rt/bin/rt-crontool index e58bafce8..be189b5ce 100755 --- a/rt/bin/rt-crontool +++ b/rt/bin/rt-crontool @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -47,6 +47,7 @@ # # END BPS TAGGED BLOCK }}} use strict; +use warnings; use Carp; # fix lib paths, some may be relative @@ -153,17 +154,13 @@ my $void_scrip_action = RT::ScripAction->new( $CurrentUser ); #find a bunch of tickets my $tickets = RT::Tickets->new($CurrentUser); -my $search = $search->new( +$search = $search->new( TicketsObj => $tickets, Argument => $search_arg, CurrentUser => $CurrentUser ); - $search->Prepare(); -# TicketsFound is an RT::Tickets object -my $tickets = $search->TicketsObj; - #for each ticket we've found while ( my $ticket = $tickets->Next() ) { print $ticket->Id() . ":\n" if ($verbose); @@ -310,18 +307,6 @@ sub load_module { } - -# =head2 loc LIST -# -# Localize this string, with the current user's currentuser object -# -# =cut - -sub loc { - $CurrentUser->loc(@_); -} - - sub help { print loc( "[_1] is a tool to act on tickets from an external scheduling tool, such as cron.", $0 )