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

(-)a/C4/Search.pm (-2 / +2 lines)
Lines 1833-1839 Format results in a form suitable for passing to the template Link Here
1833
# IMO this subroutine is pretty messy still -- it's responsible for
1833
# IMO this subroutine is pretty messy still -- it's responsible for
1834
# building the HTML output for the template
1834
# building the HTML output for the template
1835
sub searchResults {
1835
sub searchResults {
1836
    my ( $search_context, $searchdesc, $hits, $results_per_page, $offset, $scan, $marcresults ) = @_;
1836
    my ( $search_context, $searchdesc, $hits, $results_per_page, $offset, $scan, $marcresults, $xslt_variables ) = @_;
1837
    my $dbh = C4::Context->dbh;
1837
    my $dbh = C4::Context->dbh;
1838
    my @newresults;
1838
    my @newresults;
1839
1839
Lines 2236-2242 sub searchResults { Link Here
2236
        # XSLT processing of some stuff
2236
        # XSLT processing of some stuff
2237
        # we fetched the sysprefs already before the loop through all retrieved record!
2237
        # we fetched the sysprefs already before the loop through all retrieved record!
2238
        if (!$scan && $xslfile) {
2238
        if (!$scan && $xslfile) {
2239
            $oldbiblio->{XSLTResultsRecord} = XSLTParse4Display($oldbiblio->{biblionumber}, $marcrecord, $xslsyspref, 1, \@hiddenitems, $sysxml, $xslfile, $lang);
2239
            $oldbiblio->{XSLTResultsRecord} = XSLTParse4Display($oldbiblio->{biblionumber}, $marcrecord, $xslsyspref, 1, \@hiddenitems, $sysxml, $xslfile, $lang, $xslt_variables);
2240
        }
2240
        }
2241
2241
2242
        # if biblio level itypes are used and itemtype is notforloan, it can't be reserved either
2242
        # if biblio level itypes are used and itemtype is notforloan, it can't be reserved either
(-)a/opac/opac-detail.pl (-3 / +8 lines)
Lines 170-180 my $lang = $xslfile ? C4::Languages::getlanguage() : undef; Link Here
170
my $sysxml = $xslfile ? C4::XSLT::get_xslt_sysprefs() : undef;
170
my $sysxml = $xslfile ? C4::XSLT::get_xslt_sysprefs() : undef;
171
171
172
if ( $xslfile ) {
172
if ( $xslfile ) {
173
174
    my $variables = {
175
        anonymous_session => ($borrowernumber) ? 0 : 1
176
    };
177
173
    $template->param(
178
    $template->param(
174
        XSLTBloc => XSLTParse4Display(
179
        XSLTBloc => XSLTParse4Display(
175
                        $biblionumber, $record, "OPACXSLTDetailsDisplay",
180
            $biblionumber, $record, "OPACXSLTDetailsDisplay", 1, undef,
176
                        1, undef, $sysxml, $xslfile, $lang
181
            $sysxml, $xslfile, $lang, $variables
177
                    )
182
        )
178
    );
183
    );
179
}
184
}
180
185
(-)a/opac/opac-search.pl (-2 / +4 lines)
Lines 649-654 if (C4::Context->preference('OpacHiddenItemsExceptions')){ Link Here
649
    $search_context->{'category'} = $patron ? $patron->categorycode : q{};
649
    $search_context->{'category'} = $patron ? $patron->categorycode : q{};
650
}
650
}
651
651
652
my $variables = { anonymous_session => ($borrowernumber) ? 0 : 1 };
653
652
for (my $i=0;$i<@servers;$i++) {
654
for (my $i=0;$i<@servers;$i++) {
653
    my $server = $servers[$i];
655
    my $server = $servers[$i];
654
    if ($server && $server =~/biblioserver/) { # this is the local bibliographic server
656
    if ($server && $server =~/biblioserver/) { # this is the local bibliographic server
Lines 661-672 for (my $i=0;$i<@servers;$i++) { Link Here
661
                # we want as specified by $offset and $results_per_page,
663
                # we want as specified by $offset and $results_per_page,
662
                # we need to set the offset parameter of searchResults to 0
664
                # we need to set the offset parameter of searchResults to 0
663
                my @group_results = searchResults( $search_context, $query_desc, $group->{'group_count'},$results_per_page, 0, $scan,
665
                my @group_results = searchResults( $search_context, $query_desc, $group->{'group_count'},$results_per_page, 0, $scan,
664
                                                   $group->{"RECORDS"});
666
                                                   $group->{"RECORDS"}, $variables);
665
                push @newresults, { group_label => $group->{'group_label'}, GROUP_RESULTS => \@group_results };
667
                push @newresults, { group_label => $group->{'group_label'}, GROUP_RESULTS => \@group_results };
666
            }
668
            }
667
        } else {
669
        } else {
668
            @newresults = searchResults( $search_context, $query_desc, $hits, $results_per_page, $offset, $scan,
670
            @newresults = searchResults( $search_context, $query_desc, $hits, $results_per_page, $offset, $scan,
669
                                        $results_hashref->{$server}->{"RECORDS"});
671
                                        $results_hashref->{$server}->{"RECORDS"}, $variables);
670
        }
672
        }
671
        $hits = 0 unless @newresults;
673
        $hits = 0 unless @newresults;
672
674
(-)a/opac/opac-shelves.pl (-3 / +11 lines)
Lines 282-290 if ( $op eq 'view' ) { Link Here
282
                });
282
                });
283
                $record_processor->process($record);
283
                $record_processor->process($record);
284
284
285
                if ( $xslfile ) {
285
                if ($xslfile) {
286
                    $this_item->{XSLTBloc} = XSLTParse4Display( $biblionumber, $record, "OPACXSLTListsDisplay",
286
                    my $variables = {
287
                                                                1, undef, $sysxml, $xslfile, $lang);
287
                        anonymous_session => ($loggedinuser) ? 0 : 1
288
                    };
289
                    $this_item->{XSLTBloc} = XSLTParse4Display(
290
                        $biblionumber,          $record,
291
                        "OPACXSLTListsDisplay", 1,
292
                        undef,                  $sysxml,
293
                        $xslfile,               $lang,
294
                        $variables
295
                    );
288
                }
296
                }
289
297
290
                my $marcflavour = C4::Context->preference("marcflavour");
298
                my $marcflavour = C4::Context->preference("marcflavour");
(-)a/opac/opac-tags.pl (-4 / +9 lines)
Lines 267-276 if ($loggedinuser) { Link Here
267
        my $lang   = $xslfile ? C4::Languages::getlanguage()  : undef;
267
        my $lang   = $xslfile ? C4::Languages::getlanguage()  : undef;
268
        my $sysxml = $xslfile ? C4::XSLT::get_xslt_sysprefs() : undef;
268
        my $sysxml = $xslfile ? C4::XSLT::get_xslt_sysprefs() : undef;
269
269
270
        if ( $xslfile ) {
270
        if ($xslfile) {
271
            my $variables = {
272
                anonymous_session => ($loggedinuser) ? 0 : 1
273
            };
271
            $tag->{XSLTBloc} = XSLTParse4Display(
274
            $tag->{XSLTBloc} = XSLTParse4Display(
272
                    $tag->{ biblionumber }, $record, "OPACXSLTResultsDisplay",
275
                $tag->{biblionumber},     $record,
273
                    1, $hidden_items, $sysxml, $xslfile, $lang
276
                "OPACXSLTResultsDisplay", 1,
277
                $hidden_items,            $sysxml,
278
                $xslfile,                 $lang,
279
                $variables
274
            );
280
            );
275
        }
281
        }
276
282
277
- 

Return to bug 25416