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 1738-1743
sub searchResults {
Link Here
|
1738 |
: $bibliotag < 10 |
1737 |
: $bibliotag < 10 |
1739 |
? GetFrameworkCode($marcrecord->field($bibliotag)->data) |
1738 |
? GetFrameworkCode($marcrecord->field($bibliotag)->data) |
1740 |
: GetFrameworkCode($marcrecord->subfield($bibliotag,$bibliosubf)); |
1739 |
: GetFrameworkCode($marcrecord->subfield($bibliotag,$bibliosubf)); |
|
|
1740 |
|
1741 |
SetUTF8Flag($marcrecord); |
1741 |
my $oldbiblio = TransformMarcToKoha( $dbh, $marcrecord, $fw ); |
1742 |
my $oldbiblio = TransformMarcToKoha( $dbh, $marcrecord, $fw ); |
1742 |
$oldbiblio->{subtitle} = GetRecordValue('subtitle', $marcrecord, $fw); |
1743 |
$oldbiblio->{subtitle} = GetRecordValue('subtitle', $marcrecord, $fw); |
1743 |
$oldbiblio->{result_number} = $i + 1; |
1744 |
$oldbiblio->{result_number} = $i + 1; |
Lines 1788-1799
sub searchResults {
Link Here
|
1788 |
if($marcrecord->field($1)){ |
1789 |
if($marcrecord->field($1)){ |
1789 |
my @repl = $marcrecord->field($1)->subfield($2); |
1790 |
my @repl = $marcrecord->field($1)->subfield($2); |
1790 |
my $subfieldvalue = $repl[$i]; |
1791 |
my $subfieldvalue = $repl[$i]; |
1791 |
|
1792 |
$newline =~ s/\[$tag\]/$subfieldvalue/g; |
1792 |
if (! Encode::is_utf8($subfieldvalue)) { |
|
|
1793 |
$subfieldvalue = Encode::decode('UTF-8', $subfieldvalue); |
1794 |
} |
1795 |
|
1796 |
$newline =~ s/\[$tag\]/$subfieldvalue/g; |
1797 |
} |
1793 |
} |
1798 |
} |
1794 |
} |
1799 |
$newsummary .= "$newline\n"; |
1795 |
$newsummary .= "$newline\n"; |
Lines 2033-2041
sub searchResults {
Link Here
|
2033 |
} |
2029 |
} |
2034 |
|
2030 |
|
2035 |
# XSLT processing of some stuff |
2031 |
# XSLT processing of some stuff |
2036 |
use C4::Charset; |
|
|
2037 |
SetUTF8Flag($marcrecord); |
2038 |
warn $marcrecord->as_formatted if $DEBUG; |
2039 |
my $interface = $search_context eq 'opac' ? 'OPAC' : ''; |
2032 |
my $interface = $search_context eq 'opac' ? 'OPAC' : ''; |
2040 |
if (!$scan && C4::Context->preference($interface . "XSLTResultsDisplay")) { |
2033 |
if (!$scan && C4::Context->preference($interface . "XSLTResultsDisplay")) { |
2041 |
$oldbiblio->{XSLTResultsRecord} = XSLTParse4Display($oldbiblio->{biblionumber}, $marcrecord, $interface."XSLTResultsDisplay", 1, \@hiddenitems); |
2034 |
$oldbiblio->{XSLTResultsRecord} = XSLTParse4Display($oldbiblio->{biblionumber}, $marcrecord, $interface."XSLTResultsDisplay", 1, \@hiddenitems); |
2042 |
- |
|
|