Bugzilla – Attachment 9064 Details for
Bug 7937
Silence warns in OPAC error log (koha-opac-error_log)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7937: Fixes warns in authority search (C4/Authorities.pm)
Bug-7937-Fixes-warns-in-authority-search-C4Authori.patch (text/plain), 4.77 KB, created by
Katrin Fischer
on 2012-04-10 00:11:47 UTC
(
hide
)
Description:
Bug 7937: Fixes warns in authority search (C4/Authorities.pm)
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2012-04-10 00:11:47 UTC
Size:
4.77 KB
patch
obsolete
>From 4808079a83b8948bdd04bded7e90c8822cb53242 Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <Katrin.Fischer.83@web.de> >Date: Tue, 10 Apr 2012 02:05:14 +0200 >Subject: [PATCH] Bug 7937: Fixes warns in authority search > (C4/Authorities.pm) > >Errors were output when searching for authorities in OPAC. >--- > C4/AuthoritiesMarc.pm | 80 +++++++++++++++++++++++++++---------------------- > 1 files changed, 44 insertions(+), 36 deletions(-) > >diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm >index 703ea75..42c7bd4 100644 >--- a/C4/AuthoritiesMarc.pm >+++ b/C4/AuthoritiesMarc.pm >@@ -224,45 +224,53 @@ sub SearchAuthorities { > for(my $i = 0 ; $i <= $#{$value} ; $i++) > { > if (@$value[$i]){ >- if ( @$tags[$i] eq "mainmainentry" ) { >- $attr = " \@attr 1=Heading-Main "; >- } >- elsif ( @$tags[$i] eq "mainentry" ) { >- $attr = " \@attr 1=Heading "; >- } >- elsif ( @$tags[$i] eq "any" ) { >- $attr = " \@attr 1=Any "; >- } >- elsif ( @$tags[$i] eq "match" ) { >- $attr = " \@attr 1=Match "; >- } >- elsif ( @$tags[$i] eq "match-heading" ) { >- $attr = " \@attr 1=Match-heading "; >- } >- elsif ( @$tags[$i] eq "see-from" ) { >- $attr = " \@attr 1=Match-heading-see-from "; >- } >- elsif ( @$tags[$i] eq "thesaurus" ) { >- $attr = " \@attr 1=Subject-heading-thesaurus "; >- } >- if ( @$operator[$i] eq 'is' ) { >- $attr .= " \@attr 4=1 \@attr 5=100 " >- ; ##Phrase, No truncation,all of subfield field must match >- } >- elsif ( @$operator[$i] eq "=" ) { >- $attr .= " \@attr 4=107 "; #Number Exact match >- } >- elsif ( @$operator[$i] eq "start" ) { >- $attr .= " \@attr 3=2 \@attr 4=1 \@attr 5=1 " >- ; #Firstinfield Phrase, Right truncated >+ if ( @$tags[$i] ) { >+ if ( @$tags[$i] eq "mainmainentry" ) { >+ $attr = " \@attr 1=Heading-Main "; >+ } >+ elsif ( @$tags[$i] eq "mainentry" ) { >+ $attr = " \@attr 1=Heading "; >+ } >+ elsif ( @$tags[$i] eq "any" ) { >+ $attr = " \@attr 1=Any "; >+ } >+ elsif ( @$tags[$i] eq "match" ) { >+ $attr = " \@attr 1=Match "; >+ } >+ elsif ( @$tags[$i] eq "match-heading" ) { >+ $attr = " \@attr 1=Match-heading "; >+ } >+ elsif ( @$tags[$i] eq "see-from" ) { >+ $attr = " \@attr 1=Match-heading-see-from "; >+ } >+ elsif ( @$tags[$i] eq "thesaurus" ) { >+ $attr = " \@attr 1=Subject-heading-thesaurus "; >+ } > } >- elsif ( @$operator[$i] eq "exact" ) { >- $attr .= " \@attr 4=1 \@attr 5=100 \@attr 6=3 " >- ; ##Phrase, No truncation,all of subfield field must match >+ if ( @$operator[$i] ) { >+ if ( @$operator[$i] eq 'is' ) { >+ $attr .= " \@attr 4=1 \@attr 5=100 " >+ ; ##Phrase, No truncation,all of subfield field must match >+ } >+ elsif ( @$operator[$i] eq "=" ) { >+ $attr .= " \@attr 4=107 "; >+ #Number Exact match >+ } >+ elsif ( @$operator[$i] eq "start" ) { >+ $attr .= " \@attr 3=2 \@attr 4=1 \@attr 5=1 "; >+ #Firstinfield Phrase, Right truncated >+ } >+ elsif ( @$operator[$i] eq "exact" ) { >+ $attr .= " \@attr 4=1 \@attr 5=100 \@attr 6=3 "; >+ #Phrase, No truncation,all of subfield field must match >+ } >+ else { >+ $attr .= " \@attr 5=1 \@attr 4=6 "; >+ # Word list, right truncated, anywhere >+ } > } > else { >- $attr .= " \@attr 5=1 \@attr 4=6 " >- ; ## Word list, right truncated, anywhere >+ $attr .= " \@attr 5=1 \@attr 4=6 "; > } > @$value[$i] =~ s/"/\\"/g; # Escape the double-quotes in the search value > $attr =$attr."\"".@$value[$i]."\""; >-- >1.7.5.4
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 7937
:
9059
|
9060
|
9061
|
9063
|
9064
|
9065
|
9115
|
9134
|
9135
|
9141
|
9142
|
9143