From 3ed41a2cfcda5353703c80bc3baf634d235b9bba Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Mon, 27 Jul 2009 20:54:42 -0400 Subject: [PATCH] Revert "Bug 3226 - Extended characters inconsistantly displayed" This reverts commit 7a3bdce23dddaf09f980bcbb12c15eb1d604c1a9. Even though patches were submitted that fixed the breakage that this commit caused to NoZebra searchs, it turns out this breaks code that uses SimpleSearch - clients of that routine currently expect ISO2709 blobs, not MARCXML. No further patches for 3226 will be pushed until a complete, comprehensive patchset is submitted that (a) includes a test case for the original bug and (b) demonstrates that it doesn't break any aspect of bibliographic and authority searching. Signed-off-by: Galen Charlton --- C4/Context.pm | 2 +- C4/Search.pm | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/C4/Context.pm b/C4/Context.pm index 7ba57fb47d..4dab9a98c5 100644 --- a/C4/Context.pm +++ b/C4/Context.pm @@ -588,7 +588,7 @@ sub _new_Zconn { my $tried=0; # first attempt my $Zconn; # connection object $server = "biblioserver" unless $server; - $syntax = "xml" unless $syntax; + $syntax = "usmarc" unless $syntax; my $host = $context->{'listen'}->{$server}->{'content'}; my $servername = $context->{"config"}->{$server}; diff --git a/C4/Search.pm b/C4/Search.pm index 4b113c1536..456204a98c 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -467,7 +467,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_usmarc($record) if $servers[ $i - 1 ] =~ /biblioserver/; #warn $servers[$i-1]."\n".$record; #.$facet_record->title(); @@ -1237,8 +1237,7 @@ sub searchResults { my $marcflavour = C4::Context->preference("marcflavour"); # loop through all of the records we've retrieved for ( my $i = $offset ; $i <= $times - 1 ; $i++ ) { - my $marcrecord = - MARC::Record::new_from_xml( $marcresults[$i], "utf8", $marcflavour ); + my $marcrecord = MARC::File::USMARC::decode( $marcresults[$i] ); my $oldbiblio = TransformMarcToKoha( $dbh, $marcrecord, '' ); $oldbiblio->{subtitle} = C4::Biblio::get_koha_field_from_marc('bibliosubtitle', 'subtitle', $marcrecord, ''); $oldbiblio->{result_number} = $i + 1; -- 2.39.5