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

(-)a/Koha/Plugins.pm (-1 / +3 lines)
Lines 91-96 sub call { Link Here
91
    my ( $class, $method, @args ) = @_;
91
    my ( $class, $method, @args ) = @_;
92
92
93
    return unless C4::Context->config('enable_plugins');
93
    return unless C4::Context->config('enable_plugins');
94
    return if $method && $ENV{"SUSPEND_PLUGIN_$method"};
94
95
95
    my @responses;
96
    my @responses;
96
    my @plugins = $class->get_enabled_plugins( { verbose => 0 } );
97
    my @plugins = $class->get_enabled_plugins( { verbose => 0 } );
Lines 102-107 sub call { Link Here
102
        if $method eq 'after_hold_create' and @plugins;
103
        if $method eq 'after_hold_create' and @plugins;
103
104
104
    foreach my $plugin (@plugins) {
105
    foreach my $plugin (@plugins) {
106
        ( my $class = ref($plugin) ) =~ s/::/_/g;
107
        next if $class && $ENV{"SUSPEND_PLUGIN_$class"};
105
        my $response = eval { $plugin->$method(@args) };
108
        my $response = eval { $plugin->$method(@args) };
106
        if ($@) {
109
        if ($@) {
107
            warn sprintf( "Plugin error (%s): %s", $plugin->get_metadata->{name}, $@ );
110
            warn sprintf( "Plugin error (%s): %s", $plugin->get_metadata->{name}, $@ );
108
- 

Return to bug 41991