View | Details | Raw Unified | Return to bug 28590
Collapse All | Expand All

(-)a/C4/Auth.pm (-3 lines)
Lines 892-900 sub checkauth { Link Here
892
                $session->param('desk_id'),      $session->param('desk_name'),
892
                $session->param('desk_id'),      $session->param('desk_name'),
893
                $session->param('register_id'),  $session->param('register_name')
893
                $session->param('register_id'),  $session->param('register_name')
894
            );
894
            );
895
            C4::Context::set_shelves_userenv( 'bar', $session->param('barshelves') );
896
            C4::Context::set_shelves_userenv( 'pub', $session->param('pubshelves') );
897
            C4::Context::set_shelves_userenv( 'tot', $session->param('totshelves') );
898
            $debug and printf STDERR "AUTH_SESSION: (%s)\t%s %s - %s\n", map { $session->param($_) } qw(cardnumber firstname surname branch);
895
            $debug and printf STDERR "AUTH_SESSION: (%s)\t%s %s - %s\n", map { $session->param($_) } qw(cardnumber firstname surname branch);
899
            $ip          = $session->param('ip');
896
            $ip          = $session->param('ip');
900
            $lasttime    = $session->param('lasttime');
897
            $lasttime    = $session->param('lasttime');
(-)a/C4/Context.pm (-21 lines)
Lines 775-800 sub set_userenv { Link Here
775
    return $cell;
775
    return $cell;
776
}
776
}
777
777
778
sub set_shelves_userenv {
779
	my ($type, $shelves) = @_ or return;
780
	my $activeuser = $context->{activeuser} or return;
781
	$context->{userenv}->{$activeuser}->{barshelves} = $shelves if $type eq 'bar';
782
	$context->{userenv}->{$activeuser}->{pubshelves} = $shelves if $type eq 'pub';
783
	$context->{userenv}->{$activeuser}->{totshelves} = $shelves if $type eq 'tot';
784
}
785
786
sub get_shelves_userenv {
787
	my $active;
788
	unless ($active = $context->{userenv}->{$context->{activeuser}}) {
789
		$debug and warn "get_shelves_userenv cannot retrieve context->{userenv}->{context->{activeuser}}";
790
		return;
791
	}
792
	my $totshelves = $active->{totshelves} or undef;
793
	my $pubshelves = $active->{pubshelves} or undef;
794
	my $barshelves = $active->{barshelves} or undef;
795
	return ($totshelves, $pubshelves, $barshelves);
796
}
797
798
=head2 _new_userenv
778
=head2 _new_userenv
799
779
800
  C4::Context->_new_userenv($session);  # FIXME: This calling style is wrong for what looks like an _internal function
780
  C4::Context->_new_userenv($session);  # FIXME: This calling style is wrong for what looks like an _internal function
801
- 

Return to bug 28590