Revert "Bug 18613: Remove letter rule correctly as superlibrarian"

This reverts commit ab019faecad351dc7f2df55db9487fdbbbb6c59f.
This commit is contained in:
Mason James 2017-07-31 04:04:25 +12:00
parent 9a8d59bbff
commit ffd1ff2238
1 changed files with 5 additions and 3 deletions

View File

@ -204,9 +204,11 @@ sub getletter {
my ( $module, $code, $branchcode, $message_transport_type ) = @_;
$message_transport_type //= '%';
my $only_my_library = C4::Context->only_my_library;
if ( $only_my_library and $branchcode ) {
$branchcode = C4::Context::mybranch();
if ( C4::Context->preference('IndependentBranches')
and $branchcode
and C4::Context->userenv ) {
$branchcode = C4::Context->userenv->{'branch'};
}
$branchcode //= '';