X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Fsbin%2Frt-shredder.in;h=a903728ceae86ea108f3fc7aebc666478cc9927a;hb=c71b2dc296da6207c525a064d322f7153c284d4e;hp=946121c7536aed5efb2335dfc8821bf037e87121;hpb=0fb307c305e4bc2c9c27dc25a3308beae3a4d33c;p=freeside.git diff --git a/rt/sbin/rt-shredder.in b/rt/sbin/rt-shredder.in index 946121c75..a903728ce 100755 --- a/rt/sbin/rt-shredder.in +++ b/rt/sbin/rt-shredder.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -74,7 +74,7 @@ should wipeout. =head2 --sqldump -Outputs INSERT queiries into file. This dump can be used to restore data +Outputs INSERT queries into file. This dump can be used to restore data after wiping out. By default creates files @@ -135,7 +135,10 @@ BEGIN { } -use RT::Shredder (); +use RT -init; + +require RT::Shredder; + use Getopt::Long qw(GetOptions); use File::Spec (); @@ -146,8 +149,7 @@ our %plugins = RT::Shredder::Plugin->List; our %opt; parse_args(); -RT::Shredder::Init( %opt ); -my $shredder = new RT::Shredder; +my $shredder = RT::Shredder->new; { my $plugin = eval { $shredder->AddDumpPlugin( Arguments => { @@ -257,7 +259,7 @@ sub process_plugins my @res; foreach my $str( @{ $opt{'plugin'} } ) { - my $plugin = new RT::Shredder::Plugin; + my $plugin = RT::Shredder::Plugin->new; my( $status, $msg ) = $plugin->LoadByString( $str ); unless( $status ) { print STDERR "Couldn't load plugin\n";