Bugzilla – Attachment 56543 Details for
Bug 11300
Add a new authority linker which searches for authority links on a Z39.50 server.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11300: small fix for adjust using first,last and default in result search, using index Match-heading for search
Bug-11300-small-fix-for-adjust-using-firstlast-and.patch (text/plain), 2.38 KB, created by
Bouzid Fergani
on 2016-10-14 14:17:25 UTC
(
hide
)
Description:
Bug 11300: small fix for adjust using first,last and default in result search, using index Match-heading for search
Filename:
MIME Type:
Creator:
Bouzid Fergani
Created:
2016-10-14 14:17:25 UTC
Size:
2.38 KB
patch
obsolete
>From 8a18adf1d15508a35b0c745a0bc99dfa95f1bd76 Mon Sep 17 00:00:00 2001 >From: Bouzid Fergani <bouzid.fergani@inlibro.com> >Date: Fri, 14 Oct 2016 10:14:22 -0400 >Subject: [PATCH] Bug 11300: small fix for adjust using first,last and default > in result search, using index Match-heading for search > >- Rebase all patches . >- Fix using first,last and default in result search. >- Using index Match-heading for search z3950 server. >--- > C4/Linker/Z3950Server.pm | 21 +++++++++++---------- > 1 file changed, 11 insertions(+), 10 deletions(-) > >diff --git a/C4/Linker/Z3950Server.pm b/C4/Linker/Z3950Server.pm >index 366aca2..91bf235 100644 >--- a/C4/Linker/Z3950Server.pm >+++ b/C4/Linker/Z3950Server.pm >@@ -57,18 +57,19 @@ sub get_link { > # look for matching authorities > my $authorities = $heading->authorities(1); # $skipmetadata = true > >- if ( $behavior eq 'default' && $#{$authorities} == 0 ) { >+ if ( $behavior eq 'default' && $#{$authorities} == 1 ) { > $authid = $authorities->[0]->{'authid'}; > } >- elsif ( $behavior eq 'first' && $#{$authorities} >= 0 ) { >- $authid = $authorities->[0]->{'authid'}; >- $fuzzy = $#{$authorities} > 0; >- } >- elsif ( $behavior eq 'last' && $#{$authorities} >= 0 ) { >- $authid = $authorities->[ $#{$authorities} ]->{'authid'}; >- $fuzzy = $#{$authorities} > 0; >+ elsif ( $#{$authorities} > 1 ) { >+ if ($behavior eq 'first'){ >+ $authid = $authorities->[0]->{'authid'}; >+ $fuzzy = $#{$authorities} > 1; >+ } >+ else { >+ $authid = $authorities->[ $#{$authorities} - 1 ]->{'authid'}; >+ $fuzzy = $#{$authorities} > 1; >+ } > } >- > if ( !defined $authid && $self->{'broader_headings'} ) { > my $field = $heading->field(); > my @subfields = $field->subfields(); >@@ -166,7 +167,7 @@ sub getZ3950Authority { > else { > return; > } >- my $query =qq(Personal-name,do-not-truncate,ext="$heading->{'search_form'}"); >+ my $query =qq(Match-heading,do-not-truncate,ext="$heading->{'search_form'}"); > my $zquery = eval{ new ZOOM::Query::CCL2RPN($query, $self->{'conn'}) }; > if($@) { > warn $query . "\n" . $@; >-- >1.9.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 11300
:
23147
|
37918
|
37974
|
37975
|
37989
|
39649
|
45324
|
56542
|
56543
|
60999
|
67165
|
69096
|
69204
|
79400
|
94819
|
94875
|
111801
|
111896
|
115217
|
133496
|
136404
|
138029
|
141168
|
143292
|
148824
|
151079
|
151476
|
151477
|
155602
|
155603
|
159741
|
159742
|
163946
|
163947
|
171304
|
171689