Bugzilla – Attachment 1065 Details for
Bug 3067
When using getRecords on commandline, facets makes it fail.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
this adds some checking to branches in order to use the branchname
0001-Adding-some-checking-in-facet-branches.patch (text/plain), 1.38 KB, created by
Chris Cormack
on 2009-03-27 16:55:00 UTC
(
hide
)
Description:
this adds some checking to branches in order to use the branchname
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2009-03-27 16:55:00 UTC
Size:
1.38 KB
patch
obsolete
>From a9782f5970c15f1b7d2c595ecba71c976cc9f1a1 Mon Sep 17 00:00:00 2001 >From: Henri-Damien LAURENT <henridamien.laurent@biblibre.com> >Date: Fri, 27 Mar 2009 17:21:35 +0100 >Subject: [PATCH] Adding some checking in facet branches > >When using search via commandline scripts, branch facets are sometimes >failing badly. >Not a HASH reference at >C4/Search.pm line 557, >This patch prevents this >--- > C4/Search.pm | 13 +++++++++++-- > 1 files changed, 11 insertions(+), 2 deletions(-) > >diff --git a/C4/Search.pm b/C4/Search.pm >index 13a1e88..00e40ee 100644 >--- a/C4/Search.pm >+++ b/C4/Search.pm >@@ -570,8 +570,17 @@ sub getRecords { > > # if it's a branch, label by the name, not the code, > if ( $link_value =~ /branch/ ) { >- $facet_label_value = >- $branches->{$one_facet}->{'branchname'}; >+ if (defined $branches >+ && ref($branches) eq "HASH" >+ && defined $branches->{$one_facet} >+ && ref ($branches->{$one_facet}) eq "HASH") >+ { >+ $facet_label_value = >+ $branches->{$one_facet}->{'branchname'}; >+ } >+ else { >+ $facet_label_value = "*"; >+ } > } > > # but we're down with the whole label being in the link's title. >-- >1.5.6.3 >
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 3067
: 1065