From 3e4a2b3d4b61d1e741951fd33f87b5897f425619 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 18 Jun 2021 10:27:01 +0200 Subject: [PATCH] Bug 28590: Remove get_shelves_userenv and set_shelves_userenv They are no longer used since bug 7310, now we are using Koha::Virtualshelves->get_some_shelves Test plan: Create some lists, login at the OPAC and confirm that you see the list in the navbar (top) --- C4/Auth.pm | 3 --- C4/Context.pm | 20 -------------------- 2 files changed, 23 deletions(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index 2a2e3b67795..de6bca71175 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -892,9 +892,6 @@ sub checkauth { $session->param('desk_id'), $session->param('desk_name'), $session->param('register_id'), $session->param('register_name') ); - C4::Context::set_shelves_userenv( 'bar', $session->param('barshelves') ); - C4::Context::set_shelves_userenv( 'pub', $session->param('pubshelves') ); - C4::Context::set_shelves_userenv( 'tot', $session->param('totshelves') ); $debug and printf STDERR "AUTH_SESSION: (%s)\t%s %s - %s\n", map { $session->param($_) } qw(cardnumber firstname surname branch); $ip = $session->param('ip'); $lasttime = $session->param('lasttime'); diff --git a/C4/Context.pm b/C4/Context.pm index e766d838cfc..00837c10485 100644 --- a/C4/Context.pm +++ b/C4/Context.pm @@ -775,26 +775,6 @@ sub set_userenv { return $cell; } -sub set_shelves_userenv { - my ($type, $shelves) = @_ or return; - my $activeuser = $context->{activeuser} or return; - $context->{userenv}->{$activeuser}->{barshelves} = $shelves if $type eq 'bar'; - $context->{userenv}->{$activeuser}->{pubshelves} = $shelves if $type eq 'pub'; - $context->{userenv}->{$activeuser}->{totshelves} = $shelves if $type eq 'tot'; -} - -sub get_shelves_userenv { - my $active; - unless ($active = $context->{userenv}->{$context->{activeuser}}) { - $debug and warn "get_shelves_userenv cannot retrieve context->{userenv}->{context->{activeuser}}"; - return; - } - my $totshelves = $active->{totshelves} or undef; - my $pubshelves = $active->{pubshelves} or undef; - my $barshelves = $active->{barshelves} or undef; - return ($totshelves, $pubshelves, $barshelves); -} - =head2 _new_userenv C4::Context->_new_userenv($session); # FIXME: This calling style is wrong for what looks like an _internal function -- 2.20.1