Bug 35070: Fix get_enabled_plugins when database is not created yet
Koha::Plugins::get_enabled_plugins is called by Koha::Plugins::call which is called by C4::Templates->new, which is used in the web installer when the database is not created yet Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
parent
520c84756a
commit
3df1cb33c2
1 changed files with 10 additions and 3 deletions
|
@ -117,9 +117,16 @@ sub get_enabled_plugins {
|
|||
unless ($enabled_plugins) {
|
||||
my $verbose = $params->{verbose} // $class->_verbose;
|
||||
$enabled_plugins = [];
|
||||
|
||||
my @plugin_classes;
|
||||
try {
|
||||
my $rs = Koha::Database->schema->resultset('PluginData');
|
||||
$rs = $rs->search({ plugin_key => '__ENABLED__', plugin_value => 1 });
|
||||
my @plugin_classes = $rs->get_column('plugin_class')->all();
|
||||
@plugin_classes = $rs->get_column('plugin_class')->all();
|
||||
} catch {
|
||||
warn "$_";
|
||||
};
|
||||
|
||||
foreach my $plugin_class (@plugin_classes) {
|
||||
next unless can_load( modules => { $plugin_class => undef }, verbose => $verbose, nocache => 1 );
|
||||
|
||||
|
|
Loading…
Reference in a new issue