Bug 6885 Follow up patch, invert tested condition

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

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 <paul.poulain@biblibre.com>
(cherry picked from commit 6fd3635a59)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
(cherry picked from commit 19fb959d6b)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
This commit is contained in:
Frédéric Demians 2012-01-04 18:09:34 +01:00 committed by Chris Nighswonger
parent 64b18c97bb
commit 2745f3c226
1 changed files with 1 additions and 1 deletions

View File

@ -2115,7 +2115,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'}) )