diff --git a/C4/Auth.pm b/C4/Auth.pm index 8bc8572cdf..029a9572c5 100755 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -31,7 +31,7 @@ use C4::Output; # to get the template use C4::Members; use C4::Koha; use C4::Branch; # GetBranches -use C4::VirtualShelves qw/GetRecentShelves/; +use C4::VirtualShelves; # use utf8; use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $debug $ldap); @@ -711,9 +711,9 @@ sub checkauth { # and the number of lists to be displayed of each type in the 'Lists' button drop down my $row_count = 10; # FIXME:This probably should be a syspref my ($total, $totshelves, $barshelves, $pubshelves); - ($barshelves, $totshelves) = GetRecentShelves(1, $row_count, $borrowernumber); + ($barshelves, $totshelves) = C4::VirtualShelves::GetRecentShelves(1, $row_count, $borrowernumber); $total->{'bartotal'} = $totshelves; - ($pubshelves, $totshelves) = GetRecentShelves(2, $row_count, undef); + ($pubshelves, $totshelves) = C4::VirtualShelves::GetRecentShelves(2, $row_count, undef); $total->{'pubtotal'} = $totshelves; $session->param('barshelves', $barshelves->[0]); $session->param('pubshelves', $pubshelves->[0]); @@ -738,7 +738,7 @@ sub checkauth { # Grab the public shelves and add to the session... my $row_count = 20; # FIXME:This probably should be a syspref my ($total, $totshelves, $pubshelves); - ($pubshelves, $totshelves) = GetRecentShelves(2, $row_count, undef); + ($pubshelves, $totshelves) = C4::VirtualShelves::GetRecentShelves(2, $row_count, undef); $total->{'pubtotal'} = $totshelves; $session->param('pubshelves', $pubshelves->[0]); $session->param('totshelves', $total); diff --git a/C4/VirtualShelves.pm b/C4/VirtualShelves.pm index eaebb54672..3a9efd03f4 100644 --- a/C4/VirtualShelves.pm +++ b/C4/VirtualShelves.pm @@ -27,6 +27,7 @@ use C4::Context; use C4::Circulation; use C4::Debug; use C4::Members; +require C4::Auth; use vars qw($VERSION @ISA @EXPORT @EXPORT_OK); @@ -48,7 +49,6 @@ BEGIN { ); } -use C4::Auth qw(get_session); my $dbh = C4::Context->dbh; @@ -544,7 +544,7 @@ This function is used in conjunction with the 'Lists' button in masthead.inc. sub RefreshShelvesSummary ($$$) { my ($sessionID, $loggedinuser, $row_count) = @_; - my $session = get_session($sessionID); + my $session = C4::Auth::get_session($sessionID); my ($total, $totshelves, $barshelves, $pubshelves); ($barshelves, $totshelves) = GetRecentShelves(1, $row_count, $loggedinuser);