Skip to content

Commit

Permalink
[#481] [#632] No longer loading perl-initialized plugins without an e…
Browse files Browse the repository at this point in the history
…nvelope. Also removed activity log logging of said plugin non-loading but still issuing a warning to `STDERR`. ALL plugin tests pass: 100%!
  • Loading branch information
jayallen committed Jan 25, 2011
1 parent 2110386 commit 70798f3
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions lib/MT.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1738,23 +1738,17 @@ sub scan_directory_for_addons {
for my $plugin_dir (@p) {
next if ( $plugin_dir =~ /^\.\.?$/ || $plugin_dir =~ /~$/ );

# Legacy support when plugins were not
# placed in their own directory
$plugin_full_path
= File::Spec->catfile( $PluginPath, $plugin_dir );
if ( -f $plugin_full_path ) {
if ( $plugin_full_path =~ /\.pl$/ ) {
push @{ $plugins{'plugin'} },
{
dir => $PluginPath,
file => $plugin_dir,
path => $plugin_full_path,
envelope => $plugin_lastdir,
};
warn "Plugins without envelopes are no longer loaded in "
." Melody: $plugin_full_path";
# Yes, that's all you get. Don't ask for more...
next;
}
}
else {

# open and scan the directory for plugin files,
# save them to load later. Report errors in
# the activity log
Expand Down

0 comments on commit 70798f3

Please sign in to comment.