From 43a06151e47d2c59b833cbd8c26d97865ee850b6 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Thu, 7 Jun 2012 00:56:06 -0700 Subject: starting to work... --- rt/lib/RT/Shredder/Plugin.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'rt/lib/RT/Shredder/Plugin.pm') diff --git a/rt/lib/RT/Shredder/Plugin.pm b/rt/lib/RT/Shredder/Plugin.pm index 34380689a..e70d207ac 100644 --- a/rt/lib/RT/Shredder/Plugin.pm +++ b/rt/lib/RT/Shredder/Plugin.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -64,7 +64,7 @@ RT::Shredder::Plugin - interface to access shredder plugins my %plugins = RT::Shredder::Plugin->List; # load plugin by name - my $plugin = new RT::Shredder::Plugin; + my $plugin = RT::Shredder::Plugin->new; my( $status, $msg ) = $plugin->LoadByName( 'Tickets' ); unless( $status ) { print STDERR "Couldn't load plugin 'Tickets': $msg\n"; @@ -72,7 +72,7 @@ RT::Shredder::Plugin - interface to access shredder plugins } # load plugin by preformatted string - my $plugin = new RT::Shredder::Plugin; + my $plugin = RT::Shredder::Plugin->new; my( $status, $msg ) = $plugin->LoadByString( 'Tickets=status,deleted' ); unless( $status ) { print STDERR "Couldn't load plugin: $msg\n"; -- cgit v1.2.1 From c24d6e2242ae0e026684b8f95decf156aba6e75e Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Thu, 7 Jun 2012 16:55:45 -0700 Subject: rt 4.0.6 --- rt/lib/RT/Shredder/Plugin.pm | 1 + 1 file changed, 1 insertion(+) (limited to 'rt/lib/RT/Shredder/Plugin.pm') diff --git a/rt/lib/RT/Shredder/Plugin.pm b/rt/lib/RT/Shredder/Plugin.pm index e70d207ac..ad9af6ac6 100644 --- a/rt/lib/RT/Shredder/Plugin.pm +++ b/rt/lib/RT/Shredder/Plugin.pm @@ -167,6 +167,7 @@ sub LoadByName { my $self = shift; my $name = shift or return (0, "Name not specified"); + $name =~ /^\w+(::\w+)*$/ or return (0, "Invalid plugin name"); local $@; my $plugin = "RT::Shredder::Plugin::$name"; -- cgit v1.2.1