Lines 320-333
if ($op eq 'save' || $op eq 'insert'){
Link Here
|
320 |
$newdata{'surname'} = uc($newdata{'surname'}); |
320 |
$newdata{'surname'} = uc($newdata{'surname'}); |
321 |
} |
321 |
} |
322 |
|
322 |
|
323 |
if (C4::Context->preference("IndependentBranches")) { |
323 |
if ( C4::Context->preference("IndependentBranches") ) { |
324 |
unless ( C4::Context->IsSuperLibrarian() ){ |
324 |
unless ( C4::Context->IsSuperLibrarian() ) { |
325 |
$debug and print STDERR " $newdata{'branchcode'} : ".$userenv->{flags}.":".$userenv->{branch}; |
325 |
$debug && warn " $newdata{'branchcode'} : " . $userenv->{flags} . ":" . $userenv->{branch}; |
326 |
unless (!$newdata{'branchcode'} || $userenv->{branch} eq $newdata{'branchcode'}){ |
326 |
|
327 |
push @errors, "ERROR_branch"; |
327 |
unless ( !$newdata{'branchcode'} |
328 |
} |
328 |
|| GetIndependentGroupModificationRights( { for => $newdata{'branchcode'} } ) ) |
|
|
329 |
{ |
330 |
push @errors, "ERROR_branch"; |
331 |
} |
332 |
} |
333 |
|
329 |
} |
334 |
} |
330 |
} |
335 |
|
331 |
# Check if the 'userid' is unique. 'userid' might not always be present in |
336 |
# Check if the 'userid' is unique. 'userid' might not always be present in |
332 |
# the edited values list when editing certain sub-forms. Get it straight |
337 |
# the edited values list when editing certain sub-forms. Get it straight |
333 |
# from the DB if absent. |
338 |
# from the DB if absent. |
Lines 463-472
if ($nok or !$nodouble){
Link Here
|
463 |
$template->param( step_1 => 1,step_2 => 1,step_3 => 1, step_4 => 1, step_5 => 1, step_6 => 1); |
468 |
$template->param( step_1 => 1,step_2 => 1,step_3 => 1, step_4 => 1, step_5 => 1, step_6 => 1); |
464 |
} |
469 |
} |
465 |
} |
470 |
} |
466 |
if (C4::Context->preference("IndependentBranches")) { |
471 |
if ( C4::Context->preference("IndependentBranches") ) { |
467 |
my $userenv = C4::Context->userenv; |
472 |
my $userenv = C4::Context->userenv; |
468 |
if ( !C4::Context->IsSuperLibrarian() && $data{'branchcode'} ) { |
473 |
if ( !C4::Context->IsSuperLibrarian() && $data{'branchcode'} ) { |
469 |
unless ($userenv->{branch} eq $data{'branchcode'}){ |
474 |
unless ( |
|
|
475 |
GetIndependentGroupModificationRights( |
476 |
{ for => $data{'branchcode'} } |
477 |
) |
478 |
) |
479 |
{ |
470 |
print $input->redirect("/cgi-bin/koha/members/members-home.pl"); |
480 |
print $input->redirect("/cgi-bin/koha/members/members-home.pl"); |
471 |
exit; |
481 |
exit; |
472 |
} |
482 |
} |
473 |
- |
|
|