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

(-)a/C4/Search.pm (-2 / +2 lines)
Lines 1877-1883 sub searchResults { Link Here
1877
    my $xslsyspref = $interface . "XSLTResultsDisplay";
1877
    my $xslsyspref = $interface . "XSLTResultsDisplay";
1878
    my $xslfile = C4::Context->preference($xslsyspref);
1878
    my $xslfile = C4::Context->preference($xslsyspref);
1879
    my $lang = C4::Languages::getlanguage();
1879
    my $lang = C4::Languages::getlanguage();
1880
    my ($sysxml) = C4::XSLT::_get_xslt_sysprefs();
1880
    my $sysxml = C4::XSLT::get_xslt_sysprefs();
1881
1881
1882
    # loop through all of the records we've retrieved
1882
    # loop through all of the records we've retrieved
1883
    for ( my $i = $offset ; $i <= $times - 1 ; $i++ ) {
1883
    for ( my $i = $offset ; $i <= $times - 1 ; $i++ ) {
Lines 2209-2215 sub searchResults { Link Here
2209
        # XSLT processing of some stuff
2209
        # XSLT processing of some stuff
2210
        # we fetched the sysprefs already before the loop through all retrieved record!
2210
        # we fetched the sysprefs already before the loop through all retrieved record!
2211
        if (!$scan && $xslfile) {
2211
        if (!$scan && $xslfile) {
2212
            $oldbiblio->{XSLTResultsRecord} = XSLTParse4Display($oldbiblio->{biblionumber}, $marcrecord, $xslsyspref, 1, \@hiddenitems, $sysxml, $xslfile);
2212
            $oldbiblio->{XSLTResultsRecord} = XSLTParse4Display($oldbiblio->{biblionumber}, $marcrecord, $xslsyspref, 1, \@hiddenitems, $sysxml, $xslfile, $lang);
2213
        # the last parameter tells Koha to clean up the problematic ampersand entities that Zebra outputs
2213
        # the last parameter tells Koha to clean up the problematic ampersand entities that Zebra outputs
2214
        }
2214
        }
2215
2215
(-)a/C4/XSLT.pm (-5 / +6 lines)
Lines 156-162 sub _get_best_default_xslt_filename { Link Here
156
    return $xslfilename;
156
    return $xslfilename;
157
}
157
}
158
158
159
sub _get_xslt_sysprefs {
159
sub get_xslt_sysprefs {
160
    my $sysxml = "<sysprefs>\n";
160
    my $sysxml = "<sysprefs>\n";
161
    foreach my $syspref ( qw/ hidelostitems OPACURLOpenInNewWindow
161
    foreach my $syspref ( qw/ hidelostitems OPACURLOpenInNewWindow
162
                              DisplayOPACiconsXSLT URLLinkText viewISBD
162
                              DisplayOPACiconsXSLT URLLinkText viewISBD
Lines 184-194 sub _get_xslt_sysprefs { Link Here
184
184
185
sub XSLTParse4Display {
185
sub XSLTParse4Display {
186
    my ( $biblionumber, $orig_record, $xslsyspref, $fixamps, $hidden_items, $sysxml, $xslfilename, $lang ) = @_;
186
    my ( $biblionumber, $orig_record, $xslsyspref, $fixamps, $hidden_items, $sysxml, $xslfilename, $lang ) = @_;
187
    #my $xslfilename = C4::Context->preference($xslsyspref);
187
188
    $sysxml ||= C4::Context->preference($xslsyspref);
189
    $xslfilename ||= C4::Context->preference($xslsyspref);
190
    $lang ||= C4::Languages::getlanguage();
191
188
    if ( $xslfilename =~ /^\s*"?default"?\s*$/i ) {
192
    if ( $xslfilename =~ /^\s*"?default"?\s*$/i ) {
189
        my $htdocs;
193
        my $htdocs;
190
        my $theme;
194
        my $theme;
191
        # my $lang = C4::Languages::getlanguage();
192
        my $xslfile;
195
        my $xslfile;
193
        if ($xslsyspref eq "XSLTDetailsDisplay") {
196
        if ($xslsyspref eq "XSLTDetailsDisplay") {
194
            $htdocs  = C4::Context->config('intrahtdocs');
197
            $htdocs  = C4::Context->config('intrahtdocs');
Lines 215-221 sub XSLTParse4Display { Link Here
215
    }
218
    }
216
219
217
    if ( $xslfilename =~ m/\{langcode\}/ ) {
220
    if ( $xslfilename =~ m/\{langcode\}/ ) {
218
        my $lang = C4::Languages::getlanguage();
219
        $xslfilename =~ s/\{langcode\}/$lang/;
221
        $xslfilename =~ s/\{langcode\}/$lang/;
220
    }
222
    }
221
223
222
- 

Return to bug 15263