Browse Source

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)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
21.11.x
Jonathan Druart 3 years ago
parent
commit
512c7ba7e4
  1. 3
      C4/Auth.pm
  2. 20
      C4/Context.pm

3
C4/Auth.pm

@ -893,9 +893,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');

20
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

Loading…
Cancel
Save