From: Frédéric Demians Date: Wed, 4 Jan 2012 17:09:34 +0000 (+0100) Subject: Bug 6885 Follow up patch, invert tested condition X-Git-Url: http://git.rot13.org/?a=commitdiff_plain;h=6fd3635a598f0a38c1ac71e998f4cb799a1b4b3e;p=koha.git Bug 6885 Follow up patch, invert tested condition Signed-off-by: Chris Cormack Not sure the brackets are nessecary, but I think I remember learning bitwise operators have a lower priority than other relational operators so wanted to make sure we notted the result of the bitwise and, not the flag Signed-off-by: Paul Poulain --- diff --git a/C4/Items.pm b/C4/Items.pm index 8802a4c369..cf716ab0a6 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -2211,7 +2211,7 @@ sub DelItemCheck { if ($onloan){ $error = "book_on_loan" } - elsif ( C4::Context->userenv->{flags} & 1 and + elsif ( !(C4::Context->userenv->{flags} & 1) and C4::Context->preference("IndependantBranches") and (C4::Context->userenv->{branch} ne $item->{C4::Context->preference("HomeOrHoldingBranch")||'homebranch'}) )