Bugzilla – Attachment 4730 Details for
Bug 5572
Improve C4::AuthoritiesMarc->merge() + syspref AuthCleanBiblios
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
A safer varsion of previous patch
0001-Changes-to-sub-merge-in-C4-AuthoritiesMarc-to-refine.patch (text/plain), 1.68 KB, created by
Janusz Kaczmarek
on 2011-07-24 16:19:47 UTC
(
hide
)
Description:
A safer varsion of previous patch
Filename:
MIME Type:
Creator:
Janusz Kaczmarek
Created:
2011-07-24 16:19:47 UTC
Size:
1.68 KB
patch
obsolete
>From 5df3ad7a8fd3de9e28b546eecca3d4159796cb62 Mon Sep 17 00:00:00 2001 >From: Janusz Kaczmarek <januszop@gmail.com> >Date: Mon, 3 Jan 2011 16:32:21 +0200 >Subject: [PATCH] Changes to sub merge in C4::AuthoritiesMarc to refine authorities merging -- safer version >Content-Type: text/plain; charset="utf-8" > >--- > C4/AuthoritiesMarc.pm | 10 ++++++++++ > 1 files changed, 10 insertions(+), 0 deletions(-) > >diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm >index df072a7..efc37f0 100644 >--- a/C4/AuthoritiesMarc.pm >+++ b/C4/AuthoritiesMarc.pm >@@ -1315,6 +1315,13 @@ sub merge { > $oResult->destroy(); > } > #warn scalar(@reccache)." biblios to update"; >+ #Get a list of authority controlled subfields >+ $sth = $dbh->prepare("select distinct tagsubfield from auth_subfield_structure where authtypecode=? and tagfield=? and tab >=0 and hidden = 0"); >+ $sth->execute($authtypecodeto, $auth_tag_to_report_to); >+ my @subfields_controlled_by_auth_to; >+ while (my ($tagsubfield) = $sth->fetchrow) { >+ push @subfields_controlled_by_auth_to, $tagsubfield ; >+ } > # Get All candidate Tags for the change > # (This will reduce the search scope in marc records). > $sth = $dbh->prepare("select distinct tagfield from marc_subfield_structure where authtypecode=?"); >@@ -1346,6 +1353,9 @@ sub merge { > $field_to->add_subfields($subfield->[0] =>$subfield->[1]); > $exclude.= $subfield->[0]; > } >+ foreach my $subt (@subfields_controlled_by_auth_to) { >+ $exclude.= $subt; >+ } > $exclude='['.$exclude.']'; > # add subfields in $field not included in @record_to > my @restore= grep {$_->[0]!~/$exclude/} $field->subfields(); >-- >1.7.2.5 >
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 5572
:
2941
|
4730
|
7264
|
18387
|
44610
|
44628
|
45515
|
45821
|
45822
|
45823