Lines 305-318
if ($op eq 'save' || $op eq 'insert'){
Link Here
|
305 |
$newdata{'surname'} = uc($newdata{'surname'}); |
305 |
$newdata{'surname'} = uc($newdata{'surname'}); |
306 |
} |
306 |
} |
307 |
|
307 |
|
308 |
if (C4::Context->preference("IndependentBranches")) { |
308 |
if ( C4::Context->preference("IndependentBranches") ) { |
309 |
unless ( C4::Context->IsSuperLibrarian() ){ |
309 |
unless ( C4::Context->IsSuperLibrarian() ) { |
310 |
$debug and print STDERR " $newdata{'branchcode'} : ".$userenv->{flags}.":".$userenv->{branch}; |
310 |
$debug && warn " $newdata{'branchcode'} : " . $userenv->{flags} . ":" . $userenv->{branch}; |
311 |
unless (!$newdata{'branchcode'} || $userenv->{branch} eq $newdata{'branchcode'}){ |
311 |
|
312 |
push @errors, "ERROR_branch"; |
312 |
unless ( !$newdata{'branchcode'} |
313 |
} |
313 |
|| GetIndependentGroupModificationRights( { for => $newdata{'branchcode'} } ) ) |
|
|
314 |
{ |
315 |
push @errors, "ERROR_branch"; |
316 |
} |
317 |
} |
318 |
|
314 |
} |
319 |
} |
315 |
} |
320 |
|
316 |
# Check if the 'userid' is unique. 'userid' might not always be present in |
321 |
# Check if the 'userid' is unique. 'userid' might not always be present in |
317 |
# the edited values list when editing certain sub-forms. Get it straight |
322 |
# the edited values list when editing certain sub-forms. Get it straight |
318 |
# from the DB if absent. |
323 |
# from the DB if absent. |
Lines 448-457
if ($nok or !$nodouble){
Link Here
|
448 |
$template->param( step_1 => 1,step_2 => 1,step_3 => 1, step_4 => 1, step_5 => 1, step_6 => 1); |
453 |
$template->param( step_1 => 1,step_2 => 1,step_3 => 1, step_4 => 1, step_5 => 1, step_6 => 1); |
449 |
} |
454 |
} |
450 |
} |
455 |
} |
451 |
if (C4::Context->preference("IndependentBranches")) { |
456 |
if ( C4::Context->preference("IndependentBranches") ) { |
452 |
my $userenv = C4::Context->userenv; |
457 |
my $userenv = C4::Context->userenv; |
453 |
if ( !C4::Context->IsSuperLibrarian() && $data{'branchcode'} ) { |
458 |
if ( !C4::Context->IsSuperLibrarian() && $data{'branchcode'} ) { |
454 |
unless ($userenv->{branch} eq $data{'branchcode'}){ |
459 |
unless ( |
|
|
460 |
GetIndependentGroupModificationRights( |
461 |
{ for => $data{'branchcode'} } |
462 |
) |
463 |
) |
464 |
{ |
455 |
print $input->redirect("/cgi-bin/koha/members/members-home.pl"); |
465 |
print $input->redirect("/cgi-bin/koha/members/members-home.pl"); |
456 |
exit; |
466 |
exit; |
457 |
} |
467 |
} |
458 |
- |
|
|