Commit 648e2a2b authored by Baptiste Wojtkowski's avatar Baptiste Wojtkowski Committed by joubu

Bug 18613: Remove letter rule correctly as superlibrarian

TEST PLAN

(reproducing bug)
1 - Set 'IndependantBranches' to enable
2 - Log in as Superlibrarian.
3 - Create 3 rules
    - 1 for all librairies (1)
    - 1 for the library of the superlibrarian (2)
    - 1 for another library (3)
4 - Try to delete them and see them and see that (3) isn't the good one

(checking patch)
5 - Apply patch
6 - Try again 3-
7 - Connect as not superlibrarian
8 - Try again 3-
Signed-off-by: Alex Buckley's avatarAlex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: default avatarJulian Maurice <julian.maurice@biblibre.com>
Signed-off-by: joubu's avatarJonathan Druart <jonathan.druart@bugs.koha-community.org>
parent a2c9513b
......@@ -204,11 +204,9 @@ sub getletter {
$lang = 'default' unless( $lang && C4::Context->preference('TranslateNotices') );
if ( C4::Context->preference('IndependentBranches')
and $branchcode
and C4::Context->userenv ) {
$branchcode = C4::Context->userenv->{'branch'};
my $only_my_library = C4::Context->only_my_library;
if ( $only_my_library and $branchcode ) {
$branchcode = C4::Context::mybranch();
}
$branchcode //= '';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment