Bugzilla – Attachment 13439 Details for
Bug 9070
Searching for authority from tag editor for field 650 gives error
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9070: [SIGNED-OFF] authority searches in auth_finder error out
Bug-9070-SIGNED-OFF-authority-searches-in-authfind.patch (text/plain), 2.01 KB, created by
Magnus Enger
on 2012-11-13 16:18:47 UTC
(
hide
)
Description:
Bug 9070: [SIGNED-OFF] authority searches in auth_finder error out
Filename:
MIME Type:
Creator:
Magnus Enger
Created:
2012-11-13 16:18:47 UTC
Size:
2.01 KB
patch
obsolete
>From 43eb51255197643e224890eb4f0d4c6b99cc9332 Mon Sep 17 00:00:00 2001 >From: Jared Camins-Esakov <jcamins@cpbibliography.com> >Date: Tue, 13 Nov 2012 11:02:24 -0500 >Subject: [PATCH] Bug 9070: [SIGNED-OFF] authority searches in auth_finder > error out > >GetAuthType returns a hash and not a reference to a hash. When you try >to treat a regular hash like a reference, as is the case in auth_finder >when using authority records imported into Koha from elsewhere, bad >things happen. > >To test: >1) You will need records imported from elsewhere. >2) Use the authority control plugin in a bib record to search for one of > those headings. >3) Observe you get a nasty error. >4) Apply patch. >5) Repeat step 2. >6) Observe the error is gone. >7) Sign off. > >Signed-off-by: Magnus Enger <magnus@enger.priv.no> >Works as advertised. >--- > C4/AuthoritiesMarc.pm | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > >diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm >index 366a57f..2124082 100644 >--- a/C4/AuthoritiesMarc.pm >+++ b/C4/AuthoritiesMarc.pm >@@ -358,10 +358,12 @@ sub SearchAuthorities { > $reported_tag .= '$' . $_->[0] . $_->[1]; > } > } >- my $thisauthtype = GetAuthType(GetAuthTypeCode($authid)); >- $thisauthtype |= GetAuthType($authtypecode) if $authtypecode; >- $newline{authtype} = defined ($thisauthtype) ? >- $thisauthtype->{'authtypetext'} : ''; >+ my %thisauthtype = GetAuthType(GetAuthTypeCode($authid)); >+ unless (defined %thisauthtype) { >+ %thisauthtype = GetAuthType($authtypecode) if $authtypecode; >+ } >+ $newline{authtype} = defined (%thisauthtype) ? >+ $thisauthtype{'authtypetext'} : ''; > $newline{summary} = $summary; > $newline{even} = $counter % 2; > $newline{reported_tag} = $reported_tag; >-- >1.7.9.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 9070
:
13438
|
13439
|
13440
|
13441
|
13553