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 2044-2050
sub GetBorrowersToExpunge {
Link Here
|
2044 |
my $filterbranch = $params->{'branchcode'} || |
2044 |
my $filterbranch = $params->{'branchcode'} || |
2045 |
((C4::Context->preference('IndependentBranches') |
2045 |
((C4::Context->preference('IndependentBranches') |
2046 |
&& C4::Context->userenv |
2046 |
&& C4::Context->userenv |
2047 |
&& C4::Context->userenv->{flags} % 2 !=1 |
2047 |
&& !C4::Context->IsSuperLibrarian() |
2048 |
&& C4::Context->userenv->{branch}) |
2048 |
&& C4::Context->userenv->{branch}) |
2049 |
? C4::Context->userenv->{branch} |
2049 |
? C4::Context->userenv->{branch} |
2050 |
: ""); |
2050 |
: ""); |
Lines 2110-2116
sub GetBorrowersWhoHaveNeverBorrowed {
Link Here
|
2110 |
my $filterbranch = shift || |
2110 |
my $filterbranch = shift || |
2111 |
((C4::Context->preference('IndependentBranches') |
2111 |
((C4::Context->preference('IndependentBranches') |
2112 |
&& C4::Context->userenv |
2112 |
&& C4::Context->userenv |
2113 |
&& C4::Context->userenv->{flags} % 2 !=1 |
2113 |
&& !C4::Context->IsSuperLibrarian() |
2114 |
&& C4::Context->userenv->{branch}) |
2114 |
&& C4::Context->userenv->{branch}) |
2115 |
? C4::Context->userenv->{branch} |
2115 |
? C4::Context->userenv->{branch} |
2116 |
: ""); |
2116 |
: ""); |
Lines 2160-2166
sub GetBorrowersWithIssuesHistoryOlderThan {
Link Here
|
2160 |
my $filterbranch = shift || |
2160 |
my $filterbranch = shift || |
2161 |
((C4::Context->preference('IndependentBranches') |
2161 |
((C4::Context->preference('IndependentBranches') |
2162 |
&& C4::Context->userenv |
2162 |
&& C4::Context->userenv |
2163 |
&& C4::Context->userenv->{flags} % 2 !=1 |
2163 |
&& !C4::Context->IsSuperLibrarian() |
2164 |
&& C4::Context->userenv->{branch}) |
2164 |
&& C4::Context->userenv->{branch}) |
2165 |
? C4::Context->userenv->{branch} |
2165 |
? C4::Context->userenv->{branch} |
2166 |
: ""); |
2166 |
: ""); |