|
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 1931-1936
sub searchResults {
Link Here
|
| 1931 |
: $bibliotag < 10 |
1930 |
: $bibliotag < 10 |
| 1932 |
? GetFrameworkCode($marcrecord->field($bibliotag)->data) |
1931 |
? GetFrameworkCode($marcrecord->field($bibliotag)->data) |
| 1933 |
: GetFrameworkCode($marcrecord->subfield($bibliotag,$bibliosubf)); |
1932 |
: GetFrameworkCode($marcrecord->subfield($bibliotag,$bibliosubf)); |
|
|
1933 |
|
| 1934 |
SetUTF8Flag($marcrecord); |
| 1934 |
my $oldbiblio = TransformMarcToKoha( $dbh, $marcrecord, $fw ); |
1935 |
my $oldbiblio = TransformMarcToKoha( $dbh, $marcrecord, $fw ); |
| 1935 |
$oldbiblio->{subtitle} = GetRecordValue('subtitle', $marcrecord, $fw); |
1936 |
$oldbiblio->{subtitle} = GetRecordValue('subtitle', $marcrecord, $fw); |
| 1936 |
$oldbiblio->{result_number} = $i + 1; |
1937 |
$oldbiblio->{result_number} = $i + 1; |
|
Lines 1981-1992
sub searchResults {
Link Here
|
| 1981 |
if($marcrecord->field($1)){ |
1982 |
if($marcrecord->field($1)){ |
| 1982 |
my @repl = $marcrecord->field($1)->subfield($2); |
1983 |
my @repl = $marcrecord->field($1)->subfield($2); |
| 1983 |
my $subfieldvalue = $repl[$i]; |
1984 |
my $subfieldvalue = $repl[$i]; |
| 1984 |
|
1985 |
$newline =~ s/\[$tag\]/$subfieldvalue/g; |
| 1985 |
if (! Encode::is_utf8($subfieldvalue)) { |
|
|
| 1986 |
$subfieldvalue = Encode::decode('UTF-8', $subfieldvalue); |
| 1987 |
} |
| 1988 |
|
| 1989 |
$newline =~ s/\[$tag\]/$subfieldvalue/g; |
| 1990 |
} |
1986 |
} |
| 1991 |
} |
1987 |
} |
| 1992 |
$newsummary .= "$newline\n"; |
1988 |
$newsummary .= "$newline\n"; |
|
Lines 2229-2236
sub searchResults {
Link Here
|
| 2229 |
} |
2225 |
} |
| 2230 |
|
2226 |
|
| 2231 |
# XSLT processing of some stuff |
2227 |
# XSLT processing of some stuff |
| 2232 |
SetUTF8Flag($marcrecord); |
|
|
| 2233 |
warn $marcrecord->as_formatted if $DEBUG; |
| 2234 |
my $interface = $search_context eq 'opac' ? 'OPAC' : ''; |
2228 |
my $interface = $search_context eq 'opac' ? 'OPAC' : ''; |
| 2235 |
if (!$scan && C4::Context->preference($interface . "XSLTResultsDisplay")) { |
2229 |
if (!$scan && C4::Context->preference($interface . "XSLTResultsDisplay")) { |
| 2236 |
$oldbiblio->{XSLTResultsRecord} = XSLTParse4Display($oldbiblio->{biblionumber}, $marcrecord, $interface."XSLTResultsDisplay", 1, \@hiddenitems); |
2230 |
$oldbiblio->{XSLTResultsRecord} = XSLTParse4Display($oldbiblio->{biblionumber}, $marcrecord, $interface."XSLTResultsDisplay", 1, \@hiddenitems); |
| 2237 |
- |
|
|