Bugzilla – Attachment 3376 Details for
Bug 5915
UNIMARC Authorities : 100$a simple error: Sometimes, language is encoded fre50 and not frey50.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch
0001-Bug-5915-C4-AuthoritiesMarc-AddAuthority.patch (text/plain), 1.26 KB, created by
Chris Cormack
on 2011-03-21 03:13:06 UTC
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2011-03-21 03:13:06 UTC
Size:
1.26 KB
patch
obsolete
>From aafbc04dc48a2bd95af646a842a728c48542c724 Mon Sep 17 00:00:00 2001 >From: Paul Poulain <paul.poulain@biblibre.com> >Date: Sat, 16 Jan 2010 00:51:20 +0100 >Subject: [PATCH] Bug 5915 : C4::AuthoritiesMarc AddAuthority > >Fixing 100$a simple error: Sometimes, language is encoded fre50 and not >frey50. >This patch adds check for that problem >--- > C4/AuthoritiesMarc.pm | 10 +++++++--- > 1 files changed, 7 insertions(+), 3 deletions(-) > >diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm >index f3cc948..3496c05 100644 >--- a/C4/AuthoritiesMarc.pm >+++ b/C4/AuthoritiesMarc.pm >@@ -649,10 +649,14 @@ sub AddAuthority { > } > } > >- if (($format eq "UNIMARCAUTH") && (!$record->subfield('100','a'))){ >- $record->leader(" nx j22 "); >+ if ($format eq "UNIMARCAUTH") { >+ $record->leader(" nx j22 ") unless ($record->leader()); > my $date=POSIX::strftime("%Y%m%d",localtime); >- if ($record->field('100')){ >+ if (my $string=$record->subfield('100',"a")){ >+ $string=~s/fre50/frey50/; >+ $record->field('100')->update('a'=>$string); >+ } >+ elsif ($record->field('100')){ > $record->field('100')->update('a'=>$date."afrey50 ba0"); > } else { > $record->append_fields( >-- >1.7.1 >
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 5915
: 3376