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

(-)a/C4/Biblio.pm (-19 / +8 lines)
Lines 3446-3471 sub _after_biblio_action_hooks { Link Here
3446
    my $biblio_id = $args->{biblio_id};
3446
    my $biblio_id = $args->{biblio_id};
3447
    my $action    = $args->{action};
3447
    my $action    = $args->{action};
3448
3448
3449
    if ( C4::Context->config("enable_plugins") ) {
3449
    my $biblio = Koha::Biblios->find( $biblio_id );
3450
3450
    Koha::Plugins->call(
3451
        my @plugins = Koha::Plugins->new->GetPlugins({
3451
        'after_biblio_action',
3452
            method => 'after_biblio_action',
3452
        {
3453
        });
3453
            action    => $action,
3454
3454
            biblio    => $biblio,
3455
        if (@plugins) {
3455
            biblio_id => $biblio_id,
3456
3457
            my $biblio = Koha::Biblios->find( $biblio_id );
3458
3459
            foreach my $plugin ( @plugins ) {
3460
                try {
3461
                    $plugin->after_biblio_action({ action => $action, biblio => $biblio, biblio_id => $biblio_id });
3462
                }
3463
                catch {
3464
                    warn "$_";
3465
                };
3466
            }
3467
        }
3456
        }
3468
    }
3457
    );
3469
}
3458
}
3470
3459
3471
__END__
3460
__END__
(-)a/Koha/Item.pm (-17 / +7 lines)
Lines 832-855 sub _after_item_action_hooks { Link Here
832
832
833
    my $action = $params->{action};
833
    my $action = $params->{action};
834
834
835
    if ( C4::Context->config("enable_plugins") ) {
835
    Koha::Plugins->call(
836
836
        'after_item_action',
837
        my @plugins = Koha::Plugins->new->GetPlugins({
837
        {
838
            method => 'after_item_action',
838
            action  => $action,
839
        });
839
            item    => $self,
840
840
            item_id => $self->itemnumber,
841
        if (@plugins) {
842
843
            foreach my $plugin ( @plugins ) {
844
                try {
845
                    $plugin->after_item_action({ action => $action, item => $self, item_id => $self->itemnumber });
846
                }
847
                catch {
848
                    warn "$_";
849
                };
850
            }
851
        }
841
        }
852
    }
842
    );
853
}
843
}
854
844
855
=head3 _type
845
=head3 _type
(-)a/opac/opac-detail.pl (-22 / +10 lines)
Lines 185-213 if ( $xslfile ) { Link Here
185
        anonymous_session => ($borrowernumber) ? 0 : 1
185
        anonymous_session => ($borrowernumber) ? 0 : 1
186
    };
186
    };
187
187
188
    if ( C4::Context->config("enable_plugins") ) {
188
    my @plugin_responses = Koha::Plugins->call(
189
189
        'opac_detail_xslt_variables',
190
        my @plugins = Koha::Plugins->new->GetPlugins({
190
        {
191
            method => 'opac_detail_xslt_variables',
191
            biblio_id => $biblionumber,
192
        });
192
            lang      => $lang,
193
193
            patron_id => $borrowernumber
194
        if (@plugins) {
194
195
            foreach my $plugin ( @plugins ) {
196
                try {
197
                    my $plugin_variables = $plugin->opac_detail_xslt_variables(
198
                        {
199
                            biblio_id  => $biblionumber,
200
                            lang       => $lang,
201
                            patron_id  => $borrowernumber
202
                        }
203
                    );
204
                    $variables = { %$variables, %$plugin_variables };
205
                }
206
                catch {
207
                    warn "$_";
208
                };
209
            }
210
        }
195
        }
196
    );
197
    for my $plugin_variables ( @plugin_responses ) {
198
        $variables = { %$variables, %$plugin_variables };
211
    }
199
    }
212
200
213
    $template->param(
201
    $template->param(
(-)a/opac/opac-search.pl (-22 / +9 lines)
Lines 649-676 if (C4::Context->preference('OpacHiddenItemsExceptions')){ Link Here
649
}
649
}
650
650
651
my $variables = { anonymous_session => ($borrowernumber) ? 0 : 1 };
651
my $variables = { anonymous_session => ($borrowernumber) ? 0 : 1 };
652
if ( C4::Context->config("enable_plugins") ) {
652
653
653
my @plugin_responses = Koha::Plugins->call(
654
    my @plugins = Koha::Plugins->new->GetPlugins({
654
    'opac_results_xslt_variables',
655
        method => 'opac_results_xslt_variables',
655
    {
656
    });
656
        lang       => $lang,
657
657
        patron_id  => $borrowernumber
658
    if (@plugins) {
659
        foreach my $plugin ( @plugins ) {
660
            try {
661
                my $plugin_variables = $plugin->opac_results_xslt_variables(
662
                    {
663
                        lang       => $lang,
664
                        patron_id  => $borrowernumber
665
                    }
666
                );
667
                $variables = { %$variables, %$plugin_variables };
668
            }
669
            catch {
670
                warn "$_";
671
            };
672
        }
673
    }
658
    }
659
);
660
for my $plugin_variables ( @plugin_responses ) {
661
    $variables = { %$variables, %$plugin_variables };
674
}
662
}
675
663
676
for (my $i=0;$i<@servers;$i++) {
664
for (my $i=0;$i<@servers;$i++) {
677
- 

Return to bug 26063