From 31ca1f9770bd51f81a420818adecfd287fea4794 Mon Sep 17 00:00:00 2001 From: hdl Date: Fri, 29 Jul 2005 08:33:48 +0000 Subject: [PATCH] Adding superlibrarian rights when IndependantBranches is set. --- members/memberentry.pl | 6 +++++- members/moremember.pl | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/members/memberentry.pl b/members/memberentry.pl index 15a6a257ed..4ad7af21e5 100755 --- a/members/memberentry.pl +++ b/members/memberentry.pl @@ -227,7 +227,11 @@ if ($delete){ foreach my $branch (keys %$branches) { if (C4::Context->preference("IndependantBranches")) { my $userenv = C4::Context->userenv; - unless ($userenv->{flags} == 1){ + if ($userenv->{flags} == 1){ + push @select_branch, $branch; + $select_branches{$branch} = $branches->{$branch}->{'branchname'}; + $default = $data->{'branchcode'}; + } else { push @select_branch, $branch if ($branch eq $userenv->{branch}); $select_branches{$branch} = $branches->{$branch}->{'branchname'} if ($branch eq $userenv->{branch}); $default = $userenv->{branch}; diff --git a/members/moremember.pl b/members/moremember.pl index 75a69ce515..af1eb1bfd7 100755 --- a/members/moremember.pl +++ b/members/moremember.pl @@ -137,6 +137,7 @@ if (C4::Context->preference("IndependantBranches")) { unless ($userenv->{flags} == 1){ $samebranch = ($data->{'branchcode'} eq $userenv->{branch}); } + $samebranch =1 if ($userenv->{flags} == 1); } $data->{'branchcode'} = &getbranchname($data->{'branchcode'}); -- 2.39.5