diff --git a/C4/Context.pm b/C4/Context.pm index c84230dd5a..5f49bbedd6 100644 --- a/C4/Context.pm +++ b/C4/Context.pm @@ -1035,6 +1035,16 @@ sub mybranch { C4::Context->userenv or return ''; return C4::Context->userenv->{branch} || ''; } + +=head2 only_my_library + + my $test = C4::Context->only_my_library; + + Returns true if you enabled IndependentBranches and the current user + does not have superlibrarian permissions. + +=cut + sub only_my_library { return C4::Context->preference('IndependentBranches') @@ -1043,9 +1053,8 @@ sub only_my_library { && C4::Context->userenv->{branch}; } - - 1; + __END__ =head1 ENVIRONMENT diff --git a/Koha/Template/Plugin/Branches.pm b/Koha/Template/Plugin/Branches.pm index 3f62f1e834..3d17edc53b 100644 --- a/Koha/Template/Plugin/Branches.pm +++ b/Koha/Template/Plugin/Branches.pm @@ -55,10 +55,6 @@ sub GetURL { return $b->{branchurl}; } -sub OnlyMine { - return C4::Branch::onlymine; -} - sub all { my ( $self, $params ) = @_; my $selected = $params->{selected}; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/cleanborrowers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/cleanborrowers.tt index ae7df4edb5..7ff66d6e89 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/cleanborrowers.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/cleanborrowers.tt @@ -60,7 +60,7 @@