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

(-)a/C4/Search.pm (-1 / +3 lines)
Lines 1687-1693 sub searchResults { Link Here
1687
            # FIXME note that XSLTResultsDisplay (use of XSLT to format staff interface bib search results)
1687
            # FIXME note that XSLTResultsDisplay (use of XSLT to format staff interface bib search results)
1688
            # is not implemented yet
1688
            # is not implemented yet
1689
            $oldbiblio->{XSLTResultsRecord} = XSLTParse4Display($oldbiblio->{biblionumber}, $marcrecord, 'Results', 
1689
            $oldbiblio->{XSLTResultsRecord} = XSLTParse4Display($oldbiblio->{biblionumber}, $marcrecord, 'Results', 
1690
                                                                $search_context);
1690
                                                                $search_context, 1);
1691
                # the last parameter tells Koha to clean up the problematic ampersand entities that Zebra outputs
1692
1691
        }
1693
        }
1692
1694
1693
        # last check for norequest : if itemtype is notforloan, it can't be reserved either, whatever the items
1695
        # last check for norequest : if itemtype is notforloan, it can't be reserved either, whatever the items
(-)a/C4/XSLT.pm (-3 / +5 lines)
Lines 120-126 sub getAuthorisedValues4MARCSubfields { Link Here
120
my $stylesheet;
120
my $stylesheet;
121
121
122
sub XSLTParse4Display {
122
sub XSLTParse4Display {
123
    my ( $biblionumber, $orig_record, $xsl_suffix, $interface ) = @_;
123
    my ( $biblionumber, $orig_record, $xsl_suffix, $interface, $fixamps ) = @_;
124
    $interface = 'opac' unless $interface;
124
    $interface = 'opac' unless $interface;
125
    # grab the XML, run it through our stylesheet, push it out to the browser
125
    # grab the XML, run it through our stylesheet, push it out to the browser
126
    my $record = transformMARCXML4XSLT($biblionumber, $orig_record);
126
    my $record = transformMARCXML4XSLT($biblionumber, $orig_record);
Lines 139-146 sub XSLTParse4Display { Link Here
139
    }
139
    }
140
    $sysxml .= "</sysprefs>\n";
140
    $sysxml .= "</sysprefs>\n";
141
    $xmlrecord =~ s/\<\/record\>/$itemsxml$sysxml\<\/record\>/;
141
    $xmlrecord =~ s/\<\/record\>/$itemsxml$sysxml\<\/record\>/;
142
    if ($fixamps) { # We need to correct the ampersand entities that Zebra outputs
143
        $xmlrecord =~ s/\&amp;/\&/g;
144
    }
142
    $xmlrecord =~ s/\& /\&amp\; /;
145
    $xmlrecord =~ s/\& /\&amp\; /;
143
    $xmlrecord=~ s/\&amp\;amp\; /\&amp\; /;
146
    $xmlrecord =~ s/\&amp\;amp\; /\&amp\; /;
144
147
145
    my $parser = XML::LibXML->new();
148
    my $parser = XML::LibXML->new();
146
    # don't die when you find &, >, etc
149
    # don't die when you find &, >, etc
147
- 

Return to bug 3326