View | Details | Raw Unified | Return to bug 35536
Collapse All | Expand All

(-)a/Koha/Plugins.pm (-3 / +2 lines)
Lines 118-126 sub get_enabled_plugins { Link Here
118
    unless ($enabled_plugins) {
118
    unless ($enabled_plugins) {
119
        my $verbose = $params->{verbose} // $class->_verbose;
119
        my $verbose = $params->{verbose} // $class->_verbose;
120
        $enabled_plugins = [];
120
        $enabled_plugins = [];
121
        my $rs = Koha::Database->schema->resultset('PluginData');
121
        my $rs = Koha::Plugins::Datas->search({ plugin_key => '__ENABLED__', plugin_value => 1 });
122
        $rs = $rs->search({ plugin_key => '__ENABLED__', plugin_value => 1 });
122
        my @plugin_classes = $rs->get_column('plugin_class');
123
        my @plugin_classes = $rs->get_column('plugin_class')->all();
124
        foreach my $plugin_class (@plugin_classes) {
123
        foreach my $plugin_class (@plugin_classes) {
125
            next unless can_load( modules => { $plugin_class => undef }, verbose => $verbose, nocache => 1 );
124
            next unless can_load( modules => { $plugin_class => undef }, verbose => $verbose, nocache => 1 );
126
125
(-)a/t/db_dependent/Koha/Plugins/Plugins.t (-4 / +1 lines)
Lines 194-202 subtest 'Version upgrade tests' => sub { Link Here
194
    my $plugin = Koha::Plugin::Test->new( { enable_plugins => 1, cgi => CGI->new } );
194
    my $plugin = Koha::Plugin::Test->new( { enable_plugins => 1, cgi => CGI->new } );
195
195
196
    # make sure there's no version on the DB
196
    # make sure there's no version on the DB
197
    $schema->resultset('PluginData')
197
    Koha::Plugins::Datas->search( { plugin_class => $plugin->{class}, plugin_key => '__INSTALLED_VERSION__' } )->delete;
198
        ->search( { plugin_class => $plugin->{class}, plugin_key => '__INSTALLED_VERSION__' } )
199
        ->delete;
200
198
201
    $plugin = Koha::Plugin::Test->new( { enable_plugins => 1, cgi => CGI->new } );
199
    $plugin = Koha::Plugin::Test->new( { enable_plugins => 1, cgi => CGI->new } );
202
    my $version = $plugin->retrieve_data('__INSTALLED_VERSION__');
200
    my $version = $plugin->retrieve_data('__INSTALLED_VERSION__');
203
- 

Return to bug 35536