From a7a76b5265ddd62c70d2f7edbac182905c15addb 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 Content-Type: text/plain; charset=utf-8 Some cosmetic changes as to whitespace and one call less to Normalize. Test plan: Run t/Koha.t Signed-off-by: Marcel de Rooy --- C4/Koha.pm | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/C4/Koha.pm b/C4/Koha.pm index 1b2164d..48c5532 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; -- 1.7.10.4