[Koha-patches] [PATCH] Bug 3226 - Display correctly accented facets on result page
Frédéric Demians
f.demians at tamil.fr
Fri Jul 24 18:03:29 CEST 2009
---
C4/Search.pm | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/C4/Search.pm b/C4/Search.pm
index f2f738d..2c3743d 100644
--- a/C4/Search.pm
+++ b/C4/Search.pm
@@ -307,6 +307,8 @@ sub getRecords {
my @facets_loop; # stores the ref to array of hashes for template facets loop
+ my $marcflavour = C4::Context->preference("marcflavour");
+
### LOOP THROUGH THE SERVERS
for ( my $i = 0 ; $i < @servers ; $i++ ) {
$zconns[$i] = C4::Context->Zconn( $servers[$i], 1 );
@@ -447,7 +449,7 @@ sub getRecords {
my $tmpauthor;
# the minimal record in author/title (depending on MARC flavour)
- if (C4::Context->preference("marcflavour") eq "UNIMARC") {
+ if ( $marcflavour eq "UNIMARC" ) {
$tmptitle = MARC::Field->new('200',' ',' ', a => $term, f => $occ);
$tmprecord->append_fields($tmptitle);
} else {
@@ -467,7 +469,7 @@ sub getRecords {
$results_hash->{'RECORDS'}[$j] = $record;
# Fill the facets while we're looping, but only for the biblioserver
- $facet_record = MARC::Record->new_from_xml($record)
+ $facet_record = MARC::Record->new_from_xml($record, "utf8", $marcflavour)
if $servers[ $i - 1 ] =~ /biblioserver/;
#warn $servers[$i-1]."\n".$record; #.$facet_record->title();
--
1.5.6.5
More information about the Koha-patches
mailing list