lib plugins should be disabled by default and enabled as required on a per-repository basis.
PluginFactory->new enforces this:
my %SYSTEM_PLUGINS; # class variable, shared by PluginFactory instances
sub new
{
[...]
if( !scalar keys %SYSTEM_PLUGINS ) # if system plugins not already loaded
{
# load perl_lib plugins
$dir = $repository->config( "base_path" )."/perl_lib";
$self->_load_dir( \%SYSTEM_PLUGINS, $repository, $dir );
# load lib plugins
$dir = $repository->config( "base_path" )."/lib/plugins";
my @loaded = $self->_load_dir( \%SYSTEM_PLUGINS, $repository, $dir );
# disable lib plugins
my $conf = $repository->config( "plugins" );
foreach my $plugin (@loaded)
{
my $pluginid = $plugin->get_id();
if( !defined $plugin->param( "disable" ) )
{
$conf->{$pluginid}{params}{disable} = 1;
}
}
If there is more than one repository a PluginFactory instance is created for each repository (via EPrints::Repository) but lib plugins are only disabled for the FIRST repository that is loaded (for subsequent repositories SYSTEM_PLUGINS is defined).
The text was updated successfully, but these errors were encountered:
drtjmb
changed the title
Only first loaded repository disables lib and site_lib plugins
Only first loaded repository disables lib/plugins
Apr 12, 2014
lib plugins should be disabled by default and enabled as required on a per-repository basis.
PluginFactory->new enforces this:
If there is more than one repository a PluginFactory instance is created for each repository (via EPrints::Repository) but lib plugins are only disabled for the FIRST repository that is loaded (for subsequent repositories SYSTEM_PLUGINS is defined).
The text was updated successfully, but these errors were encountered: