From 59440324b58e929ff73def71ff7a045b98bc39ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?= Date: Wed, 4 Jan 2012 18:09:34 +0100 Subject: [PATCH] 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 --- C4/Items.pm | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/C4/Items.pm b/C4/Items.pm index 8802a4c..08b4d48 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'}) ) -- 1.7.5.4