Bugzilla – Attachment 130193 Details for
Bug 29173
Button "replace authority record via Z39/50/SRU" doesn't pre-fill
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29173: (follow-up) add marcflavour preference in conditions
Bug-29173-follow-up-add-marcflavour-preference-in-.patch (text/plain), 2.85 KB, created by
David Nind
on 2022-02-05 19:50:57 UTC
(
hide
)
Description:
Bug 29173: (follow-up) add marcflavour preference in conditions
Filename:
MIME Type:
Creator:
David Nind
Created:
2022-02-05 19:50:57 UTC
Size:
2.85 KB
patch
obsolete
>From 4a6a055ae85652d05c1d2437836d635783171e2e Mon Sep 17 00:00:00 2001 >From: Thibaud Guillot <thibaud.guillot@biblibre.com> >Date: Mon, 20 Dec 2021 10:54:33 +0000 >Subject: [PATCH] Bug 29173: (follow-up) add marcflavour preference in > conditions > >Signed-off-by: David Nind <david@davidnind.com> >--- > cataloguing/z3950_auth_search.pl | 25 +++++++++++++------------ > 1 file changed, 13 insertions(+), 12 deletions(-) > >diff --git a/cataloguing/z3950_auth_search.pl b/cataloguing/z3950_auth_search.pl >index d6eab4bf96..71c5a0b6d6 100755 >--- a/cataloguing/z3950_auth_search.pl >+++ b/cataloguing/z3950_auth_search.pl >@@ -31,15 +31,16 @@ use Koha::Authority::Types; > > my $input = CGI->new; > my $dbh = C4::Context->dbh; >+my $marcflavour = C4::Context->preference("marcflavour"); > my $error = $input->param('error'); > my $authid = $input->param('authid') || 0; > >-my $record = GetAuthority($authid); >-my $authobj = Koha::Authorities->find($authid); >-my $authtypecode = $authobj ? $authobj->authtypecode : ''; >+my $record = GetAuthority($authid); >+my $authobj = Koha::Authorities->find($authid); >+my $authtypecode = $authobj ? $authobj->authtypecode : ''; > my $authority_type = Koha::Authority::Types->find($authtypecode); >-my $authtag = $authority_type->auth_tag_to_report; >-my $authfields = $authtag ? $record->field($authtag) : ''; >+my $authtag = $authority_type->auth_tag_to_report; >+my $authfields = $authtag ? $record->field($authtag) : ''; > my $nameany = $input->param('nameany'); > my $authorany = $input->param('authorany'); > my $authorcorp = $input->param('authorcorp'); >@@ -57,31 +58,31 @@ $page = $input->param('goto_page') if $input->param('changepage_goto'); > my $controlnumber = $input->param('controlnumber'); > > if (! $authorpersonal) { >- if ($authtag == 100) { >+ if ($marcflavour eq 'MARC21' && $authtag == 100) { > $authorpersonal = $authfields->subfield('a'); >- } elsif ($authtag == 200) { >+ } elsif ($marcflavour eq 'UNIMARC' && $authtag == 200) { > $authorpersonal = $authfields->subfield('a'); > } > } > > if (! $authormeetingcon) { >- if ($authtag == 110) { >+ if ($marcflavour eq 'MARC21' && $authtag == 110) { > $authormeetingcon = $authfields->subfield('a'); >- } elsif ($authtag == 210) { >+ } elsif ($marcflavour eq 'UNIMARC' && $authtag == 210) { > $authormeetingcon = $authfields->subfield('a'); > } > } > > if (! $uniformtitle) { >- if ($authtag == 130) { >+ if ($marcflavour eq 'MARC21' && $authtag == 130) { > $uniformtitle = $authfields->subfield('a'); >- } elsif ($authtag == 230) { >+ } elsif ($marcflavour eq 'UNIMARC' && $authtag == 230) { > $uniformtitle = $authfields->subfield('a'); > } > } > > if (! $subject) { >- if ($authtag == 250) { >+ if ($marcflavour eq 'UNIMARC' && $authtag == 250) { > $subject = $authfields->subfield('a'); > } > } >-- >2.30.2
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 29173
:
128378
|
128410
|
128728
|
128730
|
128731
|
128756
|
130192
|
130193
|
130422
|
132443
|
136410
|
136411
|
136440
|
144867
|
144972
|
144983
|
146380
|
146381