Lines 1145-1150
sub mybranch {
Link Here
|
1145 |
C4::Context->userenv or return ''; |
1145 |
C4::Context->userenv or return ''; |
1146 |
return C4::Context->userenv->{branch} || ''; |
1146 |
return C4::Context->userenv->{branch} || ''; |
1147 |
} |
1147 |
} |
|
|
1148 |
|
1149 |
=head2 only_my_library |
1150 |
|
1151 |
my $test = C4::Context->only_my_library; |
1152 |
|
1153 |
Returns true if you enabled IndependentBranches and the current user |
1154 |
does not have superlibrarian permissions. |
1155 |
|
1156 |
=cut |
1157 |
|
1148 |
sub only_my_library { |
1158 |
sub only_my_library { |
1149 |
return |
1159 |
return |
1150 |
C4::Context->preference('IndependentBranches') |
1160 |
C4::Context->preference('IndependentBranches') |
Lines 1153-1161
sub only_my_library {
Link Here
|
1153 |
&& C4::Context->userenv->{branch}; |
1163 |
&& C4::Context->userenv->{branch}; |
1154 |
} |
1164 |
} |
1155 |
|
1165 |
|
1156 |
|
|
|
1157 |
|
1158 |
1; |
1166 |
1; |
|
|
1167 |
|
1159 |
__END__ |
1168 |
__END__ |
1160 |
|
1169 |
|
1161 |
=head1 ENVIRONMENT |
1170 |
=head1 ENVIRONMENT |