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

(-)a/opac/opac-detail.pl (+28 lines)
Lines 59-67 use Koha::ItemTypes; Link Here
59
use Koha::Acquisition::Orders;
59
use Koha::Acquisition::Orders;
60
use Koha::Virtualshelves;
60
use Koha::Virtualshelves;
61
use Koha::Patrons;
61
use Koha::Patrons;
62
use Koha::Plugins;
62
use Koha::Ratings;
63
use Koha::Ratings;
63
use Koha::Reviews;
64
use Koha::Reviews;
64
65
66
use Try::Tiny;
67
65
my $query = CGI->new();
68
my $query = CGI->new();
66
69
67
my $biblionumber = $query->param('biblionumber') || $query->param('bib') || 0;
70
my $biblionumber = $query->param('biblionumber') || $query->param('bib') || 0;
Lines 175-180 if ( $xslfile ) { Link Here
175
        anonymous_session => ($borrowernumber) ? 0 : 1
178
        anonymous_session => ($borrowernumber) ? 0 : 1
176
    };
179
    };
177
180
181
    if ( C4::Context->config("enable_plugins") ) {
182
183
        my @plugins = Koha::Plugins->new->GetPlugins({
184
            method => 'opac_detail_xslt_variables',
185
        });
186
187
        if (@plugins) {
188
            foreach my $plugin ( @plugins ) {
189
                try {
190
                    my $plugin_variables = $plugin->opac_detail_xslt_variables(
191
                        {
192
                            biblio_id  => $biblionumber,
193
                            lang       => $lang,
194
                            patron_id  => $borrowernumber
195
                        }
196
                    );
197
                    $variables = { %$variables, %$plugin_variables };
198
                }
199
                catch {
200
                    warn "$_";
201
                };
202
            }
203
        }
204
    }
205
178
    $template->param(
206
    $template->param(
179
        XSLTBloc => XSLTParse4Display(
207
        XSLTBloc => XSLTParse4Display(
180
            $biblionumber, $record, "OPACXSLTDetailsDisplay", 1, undef,
208
            $biblionumber, $record, "OPACXSLTDetailsDisplay", 1, undef,
(-)a/opac/opac-search.pl (-1 / +25 lines)
Lines 29-34 use Modern::Perl; Link Here
29
## load Koha modules
29
## load Koha modules
30
use C4::Context;
30
use C4::Context;
31
use List::MoreUtils q/any/;
31
use List::MoreUtils q/any/;
32
use Try::Tiny;
32
33
33
use Data::Dumper; # TODO remove
34
use Data::Dumper; # TODO remove
34
35
Lines 60-65 use Koha::Ratings; Link Here
60
use Koha::Virtualshelves;
61
use Koha::Virtualshelves;
61
use Koha::Library::Groups;
62
use Koha::Library::Groups;
62
use Koha::Patrons;
63
use Koha::Patrons;
64
use Koha::Plugins;
63
use Koha::SearchFields;
65
use Koha::SearchFields;
64
66
65
use POSIX qw(ceil floor strftime);
67
use POSIX qw(ceil floor strftime);
Lines 647-652 if (C4::Context->preference('OpacHiddenItemsExceptions')){ Link Here
647
}
649
}
648
650
649
my $variables = { anonymous_session => ($borrowernumber) ? 0 : 1 };
651
my $variables = { anonymous_session => ($borrowernumber) ? 0 : 1 };
652
if ( C4::Context->config("enable_plugins") ) {
653
654
    my @plugins = Koha::Plugins->new->GetPlugins({
655
        method => 'opac_results_xslt_variables',
656
    });
657
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
    }
674
}
650
675
651
for (my $i=0;$i<@servers;$i++) {
676
for (my $i=0;$i<@servers;$i++) {
652
    my $server = $servers[$i];
677
    my $server = $servers[$i];
653
- 

Return to bug 25961