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

(-)a/Koha/Item.pm (-4 / +9 lines)
Lines 1032-1040 is not passed. Link Here
1032
1032
1033
sub pickup_locations {
1033
sub pickup_locations {
1034
    my ($self, $params) = @_;
1034
    my ($self, $params) = @_;
1035
1035
    if ( C4::Context->preference("IndependentBranches")
1036
    return Koha::Libraries->search( { branchcode => $self->holdingbranch } ) if C4::Context->preference("IndependentBranches") && !C4::Context->IsSuperLibrarian();
1036
        and !C4::Context->preference("canreservefromotherbranches") )
1037
1037
    {
1038
        my $userenv = C4::Context->userenv;
1039
        unless ( C4::Context->IsSuperLibrarian ) {
1040
            return Koha::Libraries->new()->empty if ( $self->homebranch ne $userenv->{branch} );
1041
            return Koha::Libraries->search( { branchcode => $self->homebranch } );
1042
        }
1043
    }
1038
    Koha::Exceptions::MissingParameter->throw( parameter => 'patron' )
1044
    Koha::Exceptions::MissingParameter->throw( parameter => 'patron' )
1039
      unless exists $params->{patron};
1045
      unless exists $params->{patron};
1040
1046
1041
- 

Return to bug 35434