Bugzilla – Attachment 42393 Details for
Bug 12478
Elasticsearch support for Koha
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12478: Fix encoding issues on indexing
Bug-12478-Fix-encoding-issues-on-indexing.patch (text/plain), 2.33 KB, created by
Jonathan Druart
on 2015-09-04 12:37:09 UTC
(
hide
)
Description:
Bug 12478: Fix encoding issues on indexing
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2015-09-04 12:37:09 UTC
Size:
2.33 KB
patch
obsolete
>From b9e8dfd10367e7166b6a89fc69cc0574ee022033 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 4 Sep 2015 13:34:34 +0100 >Subject: [PATCH] Bug 12478: Fix encoding issues on indexing > >There were encoding issues on indexing, the way to build a marc record >was the old way (retrieved from the noxml style from rebuild_zebra). > >Here we should either c/p the code from C4::Biblio::GetMarcBiblio or >call it directly (what this patch does). >--- > Koha/Biblio.pm | 26 +++++--------------------- > 1 file changed, 5 insertions(+), 21 deletions(-) > >diff --git a/Koha/Biblio.pm b/Koha/Biblio.pm >index 6c975d6..9bfe60f 100644 >--- a/Koha/Biblio.pm >+++ b/Koha/Biblio.pm >@@ -112,15 +112,13 @@ sub get_all_biblios_iterator { > my $database = Koha::Database->new(); > my $schema = $database->schema(); > my $rs = >- $schema->resultset('Biblioitem')->search( { marc => { '!=', undef } }, >- { columns => [qw/ biblionumber marc /] } ); >+ $schema->resultset('Biblio')->search( {}, >+ { columns => [qw/ biblionumber /] } ); > my $next_func = sub { > my $row = $rs->next(); > return undef if !$row; >- my $marc = MARC::Record->new_from_usmarc( $row->marc ); >- my $bibnum = $row->get_column('biblionumber'); >- C4::Biblio::EmbedItemsInMarcBiblio( $marc, $bibnum ); >- return __PACKAGE__->new($marc, $bibnum); >+ my $marc = C4::Biblio::GetMarcBiblio( $row->biblionumber, 1 ); >+ return __PACKAGE__->new($marc, $row->biblionumber); > }; > return Koha::MetadataIterator->new($next_func); > } >@@ -148,21 +146,7 @@ If set to true, item data is embedded in the record. Default is to not do this. > sub get_marc_biblio { > my ($class, $bibnum, %options) = @_; > >- my $database = Koha::Database->new(); >- my $schema = $database->schema(); >- my $rs = >- $schema->resultset('Biblioitem') >- ->search( { marc => { '!=', undef }, biblionumber => $bibnum }, >- { columns => [qw/ marc /] } ); >- >- my $row = $rs->next(); >- return unless $row; >- my $marc = MARC::Record->new_from_usmarc($row->marc); >- >- # TODO implement this in this module >- C4::Biblio::EmbedItemsInMarcBiblio($marc, $bibnum) if $options{item_data}; >- >- return $marc; >+ return C4::Biblio::GetMarcBiblio( $bibnum, ($options{item_data} ? 1 : 0 ) ); > } > > 1; >-- >2.1.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 12478
:
29204
|
31128
|
31129
|
33136
|
33137
|
33138
|
33139
|
33140
|
33141
|
35654
|
40903
|
42030
|
42031
|
42032
|
42033
|
42062
|
42063
|
42064
|
42065
|
42066
|
42067
|
42068
|
42069
|
42392
|
42393
|
43127
|
43128
|
43129
|
43130
|
43131
|
43132
|
43133
|
43134
|
43140
|
43141
|
43142
|
43148
|
43345
|
43346
|
43347
|
43348
|
43349
|
43350
|
43351
|
43352
|
43373
|
47767
|
47768
|
50115
|
50159
|
50211
|
50212
|
50213
|
50214
|
50245
|
50246
|
50291
|
50292