From bad06abf77bdb78fa3089b7a9b37eb69dd68245c Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Fri, 28 Oct 2016 12:30:23 +0200 Subject: [PATCH] Bug 14629: [QA Follow-up] Small tidy up Some cosmetic changes as to whitespace and one call less to Normalize. Test plan: Run t/Koha.t Signed-off-by: Marcel de Rooy Signed-off-by: Kyle M Hall --- C4/Koha.pm | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/C4/Koha.pm b/C4/Koha.pm index 1b2164dbaf..48c55328b2 100644 --- a/C4/Koha.pm +++ b/C4/Koha.pm @@ -1390,17 +1390,18 @@ sub NormalizeISSN { =cut sub GetVariationsOfISSN { - my ($issn) = @_; + my ( $issn ) = @_; return unless $issn; my @issns; - - if( NormalizeISSN({issn => $issn}) ){ - push( @issns, NormalizeISSN({ issn => $issn }) ); - push( @issns, NormalizeISSN({ issn => $issn, strip_hyphen => 1 }) ); + my $str = NormalizeISSN({ issn => $issn }); + if( $str ) { + push @issns, $str; + push @issns, NormalizeISSN({ issn => $issn, strip_hyphen => 1 }); + } else { + push @issns, $issn; } - else { push( @issns, $issn) } # Strip out any "empty" strings from the array @issns = grep { defined($_) && $_ =~ /\S/ } @issns; -- 2.39.5