Lines 36-42
use URI::Escape;
Link Here
|
36 |
use Business::ISBN; |
36 |
use Business::ISBN; |
37 |
use MARC::Record; |
37 |
use MARC::Record; |
38 |
use MARC::Field; |
38 |
use MARC::Field; |
39 |
use Encode qw( decode is_utf8 ); |
|
|
40 |
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $DEBUG); |
39 |
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $DEBUG); |
41 |
|
40 |
|
42 |
# set the version for version checking |
41 |
# set the version for version checking |
Lines 1731-1736
sub searchResults {
Link Here
|
1731 |
: $bibliotag < 10 |
1730 |
: $bibliotag < 10 |
1732 |
? GetFrameworkCode($marcrecord->field($bibliotag)->data) |
1731 |
? GetFrameworkCode($marcrecord->field($bibliotag)->data) |
1733 |
: GetFrameworkCode($marcrecord->subfield($bibliotag,$bibliosubf)); |
1732 |
: GetFrameworkCode($marcrecord->subfield($bibliotag,$bibliosubf)); |
|
|
1733 |
|
1734 |
SetUTF8Flag($marcrecord); |
1734 |
my $oldbiblio = TransformMarcToKoha( $dbh, $marcrecord, $fw ); |
1735 |
my $oldbiblio = TransformMarcToKoha( $dbh, $marcrecord, $fw ); |
1735 |
$oldbiblio->{subtitle} = GetRecordValue('subtitle', $marcrecord, $fw); |
1736 |
$oldbiblio->{subtitle} = GetRecordValue('subtitle', $marcrecord, $fw); |
1736 |
$oldbiblio->{result_number} = $i + 1; |
1737 |
$oldbiblio->{result_number} = $i + 1; |
Lines 1781-1792
sub searchResults {
Link Here
|
1781 |
if($marcrecord->field($1)){ |
1782 |
if($marcrecord->field($1)){ |
1782 |
my @repl = $marcrecord->field($1)->subfield($2); |
1783 |
my @repl = $marcrecord->field($1)->subfield($2); |
1783 |
my $subfieldvalue = $repl[$i]; |
1784 |
my $subfieldvalue = $repl[$i]; |
1784 |
|
1785 |
$newline =~ s/\[$tag\]/$subfieldvalue/g; |
1785 |
if (! Encode::is_utf8($subfieldvalue)) { |
|
|
1786 |
$subfieldvalue = Encode::decode('UTF-8', $subfieldvalue); |
1787 |
} |
1788 |
|
1789 |
$newline =~ s/\[$tag\]/$subfieldvalue/g; |
1790 |
} |
1786 |
} |
1791 |
} |
1787 |
} |
1792 |
$newsummary .= "$newline\n"; |
1788 |
$newsummary .= "$newline\n"; |
Lines 2026-2034
sub searchResults {
Link Here
|
2026 |
} |
2022 |
} |
2027 |
|
2023 |
|
2028 |
# XSLT processing of some stuff |
2024 |
# XSLT processing of some stuff |
2029 |
use C4::Charset; |
|
|
2030 |
SetUTF8Flag($marcrecord); |
2031 |
warn $marcrecord->as_formatted if $DEBUG; |
2032 |
my $interface = $search_context eq 'opac' ? 'OPAC' : ''; |
2025 |
my $interface = $search_context eq 'opac' ? 'OPAC' : ''; |
2033 |
if (!$scan && C4::Context->preference($interface . "XSLTResultsDisplay")) { |
2026 |
if (!$scan && C4::Context->preference($interface . "XSLTResultsDisplay")) { |
2034 |
$oldbiblio->{XSLTResultsRecord} = XSLTParse4Display($oldbiblio->{biblionumber}, $marcrecord, $interface."XSLTResultsDisplay", 1, \@hiddenitems); |
2027 |
$oldbiblio->{XSLTResultsRecord} = XSLTParse4Display($oldbiblio->{biblionumber}, $marcrecord, $interface."XSLTResultsDisplay", 1, \@hiddenitems); |
2035 |
- |
|
|