Lines 259-265
sub Search {
Link Here
|
259 |
if ( C4::Context->preference("IndependentBranches") ) { # && !$showallbranches){ |
259 |
if ( C4::Context->preference("IndependentBranches") ) { # && !$showallbranches){ |
260 |
if ( my $userenv = C4::Context->userenv ) { |
260 |
if ( my $userenv = C4::Context->userenv ) { |
261 |
my $branch = $userenv->{'branch'}; |
261 |
my $branch = $userenv->{'branch'}; |
262 |
if ( ($userenv->{flags} % 2 !=1) && $branch ){ |
262 |
if ( !C4::Context->IsSuperLibrarian() && $branch ){ |
263 |
if (my $fr = ref $filter) { |
263 |
if (my $fr = ref $filter) { |
264 |
if ( $fr eq "HASH" ) { |
264 |
if ( $fr eq "HASH" ) { |
265 |
$filter->{branchcode} = $branch; |
265 |
$filter->{branchcode} = $branch; |
Lines 2066-2072
sub GetBorrowersToExpunge {
Link Here
|
2066 |
my $filterbranch = $params->{'branchcode'} || |
2066 |
my $filterbranch = $params->{'branchcode'} || |
2067 |
((C4::Context->preference('IndependentBranches') |
2067 |
((C4::Context->preference('IndependentBranches') |
2068 |
&& C4::Context->userenv |
2068 |
&& C4::Context->userenv |
2069 |
&& C4::Context->userenv->{flags} % 2 !=1 |
2069 |
&& !C4::Context->IsSuperLibrarian() |
2070 |
&& C4::Context->userenv->{branch}) |
2070 |
&& C4::Context->userenv->{branch}) |
2071 |
? C4::Context->userenv->{branch} |
2071 |
? C4::Context->userenv->{branch} |
2072 |
: ""); |
2072 |
: ""); |
Lines 2132-2138
sub GetBorrowersWhoHaveNeverBorrowed {
Link Here
|
2132 |
my $filterbranch = shift || |
2132 |
my $filterbranch = shift || |
2133 |
((C4::Context->preference('IndependentBranches') |
2133 |
((C4::Context->preference('IndependentBranches') |
2134 |
&& C4::Context->userenv |
2134 |
&& C4::Context->userenv |
2135 |
&& C4::Context->userenv->{flags} % 2 !=1 |
2135 |
&& !C4::Context->IsSuperLibrarian() |
2136 |
&& C4::Context->userenv->{branch}) |
2136 |
&& C4::Context->userenv->{branch}) |
2137 |
? C4::Context->userenv->{branch} |
2137 |
? C4::Context->userenv->{branch} |
2138 |
: ""); |
2138 |
: ""); |
Lines 2182-2188
sub GetBorrowersWithIssuesHistoryOlderThan {
Link Here
|
2182 |
my $filterbranch = shift || |
2182 |
my $filterbranch = shift || |
2183 |
((C4::Context->preference('IndependentBranches') |
2183 |
((C4::Context->preference('IndependentBranches') |
2184 |
&& C4::Context->userenv |
2184 |
&& C4::Context->userenv |
2185 |
&& C4::Context->userenv->{flags} % 2 !=1 |
2185 |
&& !C4::Context->IsSuperLibrarian() |
2186 |
&& C4::Context->userenv->{branch}) |
2186 |
&& C4::Context->userenv->{branch}) |
2187 |
? C4::Context->userenv->{branch} |
2187 |
? C4::Context->userenv->{branch} |
2188 |
: ""); |
2188 |
: ""); |