|
Lines 990-998
is not passed.
Link Here
|
| 990 |
|
990 |
|
| 991 |
sub pickup_locations { |
991 |
sub pickup_locations { |
| 992 |
my ($self, $params) = @_; |
992 |
my ($self, $params) = @_; |
| 993 |
|
993 |
if ( C4::Context->preference("IndependentBranches") |
| 994 |
return Koha::Libraries->search( { branchcode => $self->holdingbranch } ) if C4::Context->preference("IndependentBranches") && !C4::Context->IsSuperLibrarian(); |
994 |
and !C4::Context->preference("canreservefromotherbranches") ) |
| 995 |
|
995 |
{ |
|
|
996 |
my $userenv = C4::Context->userenv; |
| 997 |
unless ( C4::Context->IsSuperLibrarian ) { |
| 998 |
return Koha::Libraries->new()->empty if ( $self->homebranch ne $userenv->{branch} ); |
| 999 |
return Koha::Libraries->search( { branchcode => $self->homebranch } ); |
| 1000 |
} |
| 1001 |
} |
| 996 |
Koha::Exceptions::MissingParameter->throw( parameter => 'patron' ) |
1002 |
Koha::Exceptions::MissingParameter->throw( parameter => 'patron' ) |
| 997 |
unless exists $params->{patron}; |
1003 |
unless exists $params->{patron}; |
| 998 |
|
1004 |
|
| 999 |
- |
|
|