(bug #3284) fix superlibrarian check
authorNahuel ANGELINETTI <nahuel.angelinetti@biblibre.com>
Fri, 26 Jun 2009 09:25:01 +0000 (11:25 +0200)
committerGalen Charlton <galen.charlton@liblime.com>
Mon, 29 Jun 2009 19:27:22 +0000 (14:27 -0500)
This fix the superlibrarian check in the previous fix.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
members/deletemem.pl

index a1694f6..eea47b0 100755 (executable)
@@ -58,7 +58,7 @@ if ($bor->{category_type} eq "S") {
 
 if (C4::Context->preference("IndependantBranches")) {
     my $userenv = C4::Context->userenv;
-    if ($userenv->{flags} != 1 && $bor->{'branchcode'}){
+    if (($userenv->{flags} % 2 != 1) && $bor->{'branchcode'}){
         unless ($userenv->{branch} eq $bor->{'branchcode'}){
             print $input->redirect("/cgi-bin/koha/members/moremember.pl?borrowernumber=$member&error=CANT_DELETE_OTHERLIBRARY");
             exit;