Bug 35508: (QA follow-up) Fix qa script issues
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 056abc5321)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
e5ed5e05f9
commit
cf0a222fb2
|
|
@ -587,13 +587,15 @@ if ((!$nok) and $nodouble and ($op eq 'cud-insert' or $op eq 'cud-save')){
|
|||
}
|
||||
}
|
||||
|
||||
if ( $success ) {
|
||||
if (C4::Context->preference('ExtendedPatronAttributes') and $input->param('setting_extended_patron_attributes')) {
|
||||
if ($success) {
|
||||
if ( C4::Context->preference('ExtendedPatronAttributes')
|
||||
and $input->param('setting_extended_patron_attributes') )
|
||||
{
|
||||
my $existing_attributes = $patron->extended_attributes->filter_by_branch_limitations->unblessed;
|
||||
|
||||
my $needs_update = 1;
|
||||
|
||||
# If there are an unqueunal number of new and old patron attributes they definietely need updated
|
||||
# If there are an unqueunal number of new and old patron attributes they definitely need updated
|
||||
if ( scalar @{$existing_attributes} == scalar @{$extended_patron_attributes} ) {
|
||||
my $seen = 0;
|
||||
for ( my $i = 0 ; $i <= scalar @{$extended_patron_attributes} ; $i++ ) {
|
||||
|
|
@ -625,23 +627,27 @@ if ((!$nok) and $nodouble and ($op eq 'cud-insert' or $op eq 'cud-save')){
|
|||
}
|
||||
}
|
||||
|
||||
if ($needs_update) {
|
||||
$patron->extended_attributes->filter_by_branch_limitations->delete;
|
||||
$patron->extended_attributes($extended_patron_attributes);
|
||||
}
|
||||
if ($needs_update) {
|
||||
$patron->extended_attributes->filter_by_branch_limitations->delete;
|
||||
$patron->extended_attributes($extended_patron_attributes);
|
||||
}
|
||||
}
|
||||
|
||||
if ( $destination eq 'circ' and not C4::Auth::haspermission( C4::Context->userenv->{id}, { circulate => 'circulate_remaining_permissions' } ) ) {
|
||||
if (
|
||||
$destination eq 'circ'
|
||||
and not C4::Auth::haspermission(
|
||||
C4::Context->userenv->{id},
|
||||
{ circulate => 'circulate_remaining_permissions' }
|
||||
)
|
||||
)
|
||||
{
|
||||
# If we want to redirect to circulation.pl and need to check if the logged in user has the necessary permission
|
||||
$destination = 'not_circ';
|
||||
}
|
||||
print scalar( $destination eq "circ" )
|
||||
? $input->redirect(
|
||||
"/cgi-bin/koha/circ/circulation.pl?borrowernumber=$borrowernumber")
|
||||
: $input->redirect(
|
||||
"/cgi-bin/koha/members/moremember.pl?borrowernumber=$borrowernumber"
|
||||
);
|
||||
exit; # You can only send 1 redirect! After that, content or other headers don't matter.
|
||||
? $input->redirect("/cgi-bin/koha/circ/circulation.pl?borrowernumber=$borrowernumber")
|
||||
: $input->redirect("/cgi-bin/koha/members/moremember.pl?borrowernumber=$borrowernumber");
|
||||
exit; # You can only send 1 redirect! After that, content or other headers don't matter.
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue