Bug 20998: Simplify the conditional statement
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
parent
3afc24c776
commit
d874e52cdc
|
|
@ -53,8 +53,13 @@ if ( $quicksearch and $searchmember ) {
|
|||
$branchcode = $userenv->{'branch'};
|
||||
}
|
||||
my $patron = Koha::Patrons->find( { cardnumber => $searchmember } );
|
||||
if( ( $branchcode and $patron and $patron->branchcode eq $branchcode ) or ( not $branchcode and $patron ) ){
|
||||
print $input->redirect("/cgi-bin/koha/members/moremember.pl?borrowernumber=" . $patron->borrowernumber);
|
||||
if (
|
||||
$patron
|
||||
and ( ( $branchcode and $patron->branchcode eq $branchcode )
|
||||
or ( not $branchcode ) )
|
||||
)
|
||||
{
|
||||
print $input->redirect( "/cgi-bin/koha/members/moremember.pl?borrowernumber=" . $patron->borrowernumber );
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue