Bugzilla – Attachment 1453 Details for
Bug 3598
isbn and import from z39.50
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
bugfix
0001--bug-3598-normalize-isbn.patch (text/plain), 2.08 KB, created by
Chris Cormack
on 2009-09-10 12:53:00 UTC
(
hide
)
Description:
bugfix
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2009-09-10 12:53:00 UTC
Size:
2.08 KB
patch
obsolete
>From 833489e4185279dd62e8cb8a608e7e8c0b44153b Mon Sep 17 00:00:00 2001 >From: Nahuel ANGELINETTI <nahuel.angelinetti@biblibre.com> >Date: Thu, 10 Sep 2009 14:52:01 +0200 >Subject: [PATCH] (bug #3598) normalize isbn >Content-Type: text/plain; charset="utf-8" > >This patch normalize isbn's of notices imported via z39.50 >--- > cataloguing/z3950_search.pl | 20 ++++++++++++++++++++ > 1 files changed, 20 insertions(+), 0 deletions(-) > >diff --git a/cataloguing/z3950_search.pl b/cataloguing/z3950_search.pl >index df2fab1..53d48a6 100755 >--- a/cataloguing/z3950_search.pl >+++ b/cataloguing/z3950_search.pl >@@ -207,6 +207,26 @@ warn "query ".$query if $DEBUG; > my ($charset_result, $charset_errors); > ($marcrecord, $charset_result, $charset_errors) = > MarcToUTF8Record($marcdata, C4::Context->preference('marcflavour'), $encoding[$k]); >+ >+ # We clean the ISBN >+ my ($bibliotag,$bibliosubf)=GetMarcFromKohaField('biblioitems.isbn',''); >+ >+ if ($bibliotag<10){ >+ $isbn = $marcrecord->field($bibliotag)->data; >+ }else{ >+ $isbn = $marcrecord->subfield($bibliotag,$bibliosubf); >+ } >+ >+ $isbn = C4::Koha::_isbn_cleanup($isbn); >+ >+ if($marcrecord->field($bibliotag)){ >+ if($bibliotag < 10){ >+ $marcrecord->field($bibliotag)->update($isbn) >+ }else{ >+ $marcrecord->field($bibliotag)->update($bibliosubf => $isbn); >+ } >+ } >+ > ####WARNING records coming from Z3950 clients are in various character sets MARC8,UTF8,UNIMARC etc > ## In HEAD i change everything to UTF-8 > # In rel2_2 i am not sure what encoding is so no character conversion is done here >-- >1.6.0.4 >
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 3598
: 1453