From 9d0fdfab5a890be56544ea2c67a2a2c59f93e4e2 Mon Sep 17 00:00:00 2001 From: Joshua Ferraro Date: Wed, 19 Mar 2008 17:46:26 -0400 Subject: [PATCH] don't show library facet if singleBranchMode is ON Signed-off-by: Joshua Ferraro --- C4/Koha.pm | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/C4/Koha.pm b/C4/Koha.pm index 71212e0439..f653271dc7 100644 --- a/C4/Koha.pm +++ b/C4/Koha.pm @@ -587,14 +587,18 @@ sub getFacets { tags => ['225'], subfield => 'a', }, - { + ]; + + my $library_facet; + + $library_facet = { link_value => 'branch', label_value => 'Libraries', tags => [ '995', ], subfield => 'b', expanded => '1', - }, - ]; + }; + push @$facets, $library_facet unless C4::Context->preference("singleBranchMode"); } else { $facets = [ @@ -635,14 +639,16 @@ sub getFacets { tags => [ '440', '490', ], subfield => 'a', }, - { + ]; + my $library_facet; + $library_facet = { link_value => 'branch', label_value => 'Libraries', tags => [ '952', ], subfield => 'b', expanded => '1', - }, - ]; + }; + push @$facets, $library_facet unless C4::Context->preference("singleBranchMode"); } return $facets; } -- 2.39.2