|
Lines 85-88
sub InIndependentBranchesMode {
Link Here
|
| 85 |
return ( not C4::Context->preference("IndependentBranches") or C4::Context::IsSuperLibrarian ); |
85 |
return ( not C4::Context->preference("IndependentBranches") or C4::Context::IsSuperLibrarian ); |
| 86 |
} |
86 |
} |
| 87 |
|
87 |
|
|
|
88 |
sub pickup_locations { |
| 89 |
my ( $self, $params ) = @_; |
| 90 |
$params->{search_params} ||= {}; |
| 91 |
$params->{search_params}->{pickup_location} = 1; |
| 92 |
return $self->all($params); |
| 93 |
|
| 94 |
my $selected = $params->{selected}; |
| 95 |
my $libraries = Koha::Libraries->pickup_locations($params); |
| 96 |
for my $l (@$libraries) { |
| 97 |
if ( defined $selected and $l->{branchcode} eq $selected |
| 98 |
or not defined $selected |
| 99 |
and C4::Context->userenv |
| 100 |
and $l->{branchcode} eq C4::Context->userenv->{branch} ) |
| 101 |
{ |
| 102 |
$l->{selected} = 1; |
| 103 |
} |
| 104 |
} |
| 105 |
|
| 106 |
return $libraries; |
| 107 |
} |
| 108 |
|
| 88 |
1; |
109 |
1; |
| 89 |
- |
|
|