From e7aa94b78216e9c71c2ecbcec3b329db8af54f46 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 9 Feb 2018 10:49:56 -0300 Subject: [PATCH] Bug 20157: Do not display OPAC groups on the staff interface Signed-off-by: Jonathan Druart --- C4/Auth.pm | 2 +- catalogue/search.pl | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index 430c287efc..9942593538 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -513,7 +513,7 @@ sub get_template_and_user { $opac_name = C4::Context->userenv->{'branch'}; } - my @search_groups = Koha::Library::Groups->get_search_groups(); + my @search_groups = Koha::Library::Groups->get_search_groups({ interface => 'opac' }); $template->param( OpacAdditionalStylesheet => C4::Context->preference("OpacAdditionalStylesheet"), AnonSuggestions => "" . C4::Context->preference("AnonSuggestions"), diff --git a/catalogue/search.pl b/catalogue/search.pl index 26b7ef1f38..79ba83fd08 100755 --- a/catalogue/search.pl +++ b/catalogue/search.pl @@ -209,11 +209,8 @@ if($cgi->cookie("intranet_bib_list")){ @cart_list = split(/\//, $cart_list); } -my @search_groups_opac = - Koha::Library::Groups->get_search_groups( { interface => 'opac' } ); -my @search_groups_staff = +my @search_groups = Koha::Library::Groups->get_search_groups( { interface => 'staff' } ); -my @search_groups = ( @search_groups_opac, @search_groups_staff ); @search_groups = sort { $a->title cmp $b->title } @search_groups; $template->param( -- 2.39.5