|
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 1749-1754
sub searchResults {
Link Here
|
| 1749 |
: $bibliotag < 10 |
1748 |
: $bibliotag < 10 |
| 1750 |
? GetFrameworkCode($marcrecord->field($bibliotag)->data) |
1749 |
? GetFrameworkCode($marcrecord->field($bibliotag)->data) |
| 1751 |
: GetFrameworkCode($marcrecord->subfield($bibliotag,$bibliosubf)); |
1750 |
: GetFrameworkCode($marcrecord->subfield($bibliotag,$bibliosubf)); |
|
|
1751 |
|
| 1752 |
SetUTF8Flag($marcrecord); |
| 1752 |
my $oldbiblio = TransformMarcToKoha( $dbh, $marcrecord, $fw ); |
1753 |
my $oldbiblio = TransformMarcToKoha( $dbh, $marcrecord, $fw ); |
| 1753 |
$oldbiblio->{subtitle} = GetRecordValue('subtitle', $marcrecord, $fw); |
1754 |
$oldbiblio->{subtitle} = GetRecordValue('subtitle', $marcrecord, $fw); |
| 1754 |
$oldbiblio->{result_number} = $i + 1; |
1755 |
$oldbiblio->{result_number} = $i + 1; |
|
Lines 1799-1810
sub searchResults {
Link Here
|
| 1799 |
if($marcrecord->field($1)){ |
1800 |
if($marcrecord->field($1)){ |
| 1800 |
my @repl = $marcrecord->field($1)->subfield($2); |
1801 |
my @repl = $marcrecord->field($1)->subfield($2); |
| 1801 |
my $subfieldvalue = $repl[$i]; |
1802 |
my $subfieldvalue = $repl[$i]; |
| 1802 |
|
1803 |
$newline =~ s/\[$tag\]/$subfieldvalue/g; |
| 1803 |
if (! Encode::is_utf8($subfieldvalue)) { |
|
|
| 1804 |
$subfieldvalue = Encode::decode('UTF-8', $subfieldvalue); |
| 1805 |
} |
| 1806 |
|
| 1807 |
$newline =~ s/\[$tag\]/$subfieldvalue/g; |
| 1808 |
} |
1804 |
} |
| 1809 |
} |
1805 |
} |
| 1810 |
$newsummary .= "$newline\n"; |
1806 |
$newsummary .= "$newline\n"; |
|
Lines 2047-2055
sub searchResults {
Link Here
|
| 2047 |
} |
2043 |
} |
| 2048 |
|
2044 |
|
| 2049 |
# XSLT processing of some stuff |
2045 |
# XSLT processing of some stuff |
| 2050 |
use C4::Charset; |
|
|
| 2051 |
SetUTF8Flag($marcrecord); |
| 2052 |
warn $marcrecord->as_formatted if $DEBUG; |
| 2053 |
my $interface = $search_context eq 'opac' ? 'OPAC' : ''; |
2046 |
my $interface = $search_context eq 'opac' ? 'OPAC' : ''; |
| 2054 |
if (!$scan && C4::Context->preference($interface . "XSLTResultsDisplay")) { |
2047 |
if (!$scan && C4::Context->preference($interface . "XSLTResultsDisplay")) { |
| 2055 |
$oldbiblio->{XSLTResultsRecord} = XSLTParse4Display($oldbiblio->{biblionumber}, $marcrecord, $interface."XSLTResultsDisplay", 1, \@hiddenitems); |
2048 |
$oldbiblio->{XSLTResultsRecord} = XSLTParse4Display($oldbiblio->{biblionumber}, $marcrecord, $interface."XSLTResultsDisplay", 1, \@hiddenitems); |
| 2056 |
- |
|
|