summaryrefslogtreecommitdiff
path: root/rt/lib/RT/Shredder/Plugin.pm
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2012-06-30 01:03:13 -0700
committerIvan Kohler <ivan@freeside.biz>2012-06-30 01:03:13 -0700
commitf3c4966ed1f6ec3db7accd6dcdd3a5a3821d72a7 (patch)
treee5e9a077260613e6117d4697dd2985abd9b03d34 /rt/lib/RT/Shredder/Plugin.pm
parentcf7cd8efc7095aadbdfb0cd8e7ea0e2e8b9e9085 (diff)
parentcd3eb95ed1f3dc3e04cfc2b3b405f75b3ab086da (diff)
merging RT 4.0.6
Diffstat (limited to 'rt/lib/RT/Shredder/Plugin.pm')
-rw-r--r--rt/lib/RT/Shredder/Plugin.pm7
1 files changed, 4 insertions, 3 deletions
diff --git a/rt/lib/RT/Shredder/Plugin.pm b/rt/lib/RT/Shredder/Plugin.pm
index 34380689a..ad9af6ac6 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
# <sales@bestpractical.com>
#
# (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";
@@ -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";