Bug 6875 de-nesting C4::VirtualShelves
* C4::Circulation is unused, removing it
* C4::Members used only in ShelfPossibleAction, switching from use to require
* C4::Auth used only in RefreshShelvesSummary, a sub called only in
opac-addbybiblionumber.pl script, moving the require inside the sub
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
(cherry picked from commit 4d2cfa610e)
Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
This commit is contained in:
parent
0e61cfb3a5
commit
6eb50992e8
|
|
@ -26,10 +26,7 @@ use warnings;
|
|||
|
||||
use Carp;
|
||||
use C4::Context;
|
||||
use C4::Circulation;
|
||||
use C4::Debug;
|
||||
use C4::Members;
|
||||
require C4::Auth;
|
||||
|
||||
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
|
||||
|
||||
|
|
@ -466,7 +463,8 @@ sub ShelfPossibleAction {
|
|||
my $sth = $dbh->prepare($query);
|
||||
$sth->execute($shelfnumber);
|
||||
my ( $owner, $category ) = $sth->fetchrow;
|
||||
my $borrower = GetMemberDetails($user);
|
||||
require C4::Members;
|
||||
my $borrower = C4::Members::GetMemberDetails($user);
|
||||
return 0 if not defined($user);
|
||||
return 1 if ( $category >= 3); # open list
|
||||
return 1 if (($category >= 2) and
|
||||
|
|
@ -559,7 +557,7 @@ This function is used in conjunction with the 'Lists' button in masthead.inc.
|
|||
=cut
|
||||
|
||||
sub RefreshShelvesSummary ($$$) {
|
||||
|
||||
require C4::Auth;
|
||||
my ($sessionID, $loggedinuser, $row_count) = @_;
|
||||
my $session = C4::Auth::get_session($sessionID);
|
||||
my ($total, $totshelves, $barshelves, $pubshelves);
|
||||
|
|
|
|||
Loading…
Reference in New Issue