|
Lines 1035-1040
sub mybranch {
Link Here
|
| 1035 |
C4::Context->userenv or return ''; |
1035 |
C4::Context->userenv or return ''; |
| 1036 |
return C4::Context->userenv->{branch} || ''; |
1036 |
return C4::Context->userenv->{branch} || ''; |
| 1037 |
} |
1037 |
} |
|
|
1038 |
|
| 1039 |
=head2 only_my_library |
| 1040 |
|
| 1041 |
my $test = C4::Context->only_my_library; |
| 1042 |
|
| 1043 |
Returns true if you enabled IndependentBranches and the current user |
| 1044 |
does not have superlibrarian permissions. |
| 1045 |
|
| 1046 |
=cut |
| 1047 |
|
| 1038 |
sub only_my_library { |
1048 |
sub only_my_library { |
| 1039 |
return |
1049 |
return |
| 1040 |
C4::Context->preference('IndependentBranches') |
1050 |
C4::Context->preference('IndependentBranches') |
|
Lines 1043-1051
sub only_my_library {
Link Here
|
| 1043 |
&& C4::Context->userenv->{branch}; |
1053 |
&& C4::Context->userenv->{branch}; |
| 1044 |
} |
1054 |
} |
| 1045 |
|
1055 |
|
| 1046 |
|
|
|
| 1047 |
|
| 1048 |
1; |
1056 |
1; |
|
|
1057 |
|
| 1049 |
__END__ |
1058 |
__END__ |
| 1050 |
|
1059 |
|
| 1051 |
=head1 ENVIRONMENT |
1060 |
=head1 ENVIRONMENT |