@@ -, +, @@ --- opac/opac-memberentry.pl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) --- a/opac/opac-memberentry.pl +++ a/opac/opac-memberentry.pl @@ -75,14 +75,14 @@ if ( $action eq q{} ) { my $mandatory = GetMandatoryFields($action); my @libraries = Koha::Libraries->search; -if ( my @libraries_to_display = split '\|', C4::Context->preference('PatronSelfRegistrationLibraryList') ) { - if ( $action eq 'new' ) { - @libraries = map { - my $b = $_; - my $branchcode = $_->branchcode; - ( grep { $_ eq $branchcode } @libraries_to_display ) ? $b : () - } @libraries; - } +if ( $action eq 'new' + && ( my @libraries_to_display = split '\|', C4::Context->preference('PatronSelfRegistrationLibraryList') ) +) { + @libraries = map { + my $b = $_; + my $branchcode = $_->branchcode; + ( grep { $_ eq $branchcode } @libraries_to_display ) ? $b : () + } @libraries; } my ( $min, $max ) = C4::Members::get_cardnumber_length(); if ( defined $min ) { --