View | Details | Raw Unified | Return to bug 14629
Collapse All | Expand All

(-)a/C4/Koha.pm (-2 / +5 lines)
Lines 1663-1670 sub GetVariationsOfISSN { Link Here
1663
1663
1664
    my @issns;
1664
    my @issns;
1665
1665
1666
    push( @issns, NormalizeISSN({ issn => $issn }) );
1666
    if( NormalizeISSN({issn => $issn}) ){
1667
    push( @issns, NormalizeISSN({ issn => $issn, strip_hyphen => 1 }) );
1667
        push( @issns, NormalizeISSN({ issn => $issn }) );
1668
        push( @issns, NormalizeISSN({ issn => $issn, strip_hyphen => 1 }) );
1669
    }
1670
    else { push( @issns, $issn) }
1668
1671
1669
    # Strip out any "empty" strings from the array
1672
    # Strip out any "empty" strings from the array
1670
    @issns = grep { defined($_) && $_ =~ /\S/ } @issns;
1673
    @issns = grep { defined($_) && $_ =~ /\S/ } @issns;
(-)a/t/Koha.t (-3 / +3 lines)
Lines 25-31 use Module::Load::Conditional qw/check_install/; Link Here
25
25
26
BEGIN {
26
BEGIN {
27
    if ( check_install( module => 'Test::DBIx::Class' ) ) {
27
    if ( check_install( module => 'Test::DBIx::Class' ) ) {
28
        plan tests => 37;
28
        plan tests => 38;
29
    } else {
29
    } else {
30
        plan skip_all => "Need Test::DBIx::Class"
30
        plan skip_all => "Need Test::DBIx::Class"
31
    }
31
    }
Lines 152-157 eval { Link Here
152
ok($@ eq '', 'NormalizeISSN does not throw exception when parsing invalid ISSN');
152
ok($@ eq '', 'NormalizeISSN does not throw exception when parsing invalid ISSN');
153
153
154
@issns = GetVariationsOfISSNs('abc');
154
@issns = GetVariationsOfISSNs('abc');
155
is(scalar(@issns), 0, 'zero variations returned of invalid ISSN');
155
is($issns[0], 'abc', 'Original ISSN passed through even if invalid');
156
is(scalar(@issns), 1, 'zero additional variations returned of invalid ISSN');
156
157
157
1;
158
1;
158
- 

Return to bug 14629