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