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

(-)a/C4/MarcModificationTemplates.pm (-1 / +3 lines)
Lines 81-87 sub GetModificationTemplates { Link Here
81
81
82
  my @templates;
82
  my @templates;
83
  while ( my $template = $sth->fetchrow_hashref() ) {
83
  while ( my $template = $sth->fetchrow_hashref() ) {
84
    $template->{'selected'} = 1 if ( $template->{'template_id'} eq $template_id );
84
    $template->{'selected'} = 1 if ( $template_id and $template->{'template_id'} eq $template_id );
85
    push( @templates, $template );
85
    push( @templates, $template );
86
  }
86
  }
87
87
Lines 624-629 sub ModifyRecordWithTemplate { Link Here
624
624
625
        warn( $record->as_formatted() ) if DEBUG >= 10;
625
        warn( $record->as_formatted() ) if DEBUG >= 10;
626
    }
626
    }
627
628
    return;
627
}
629
}
628
1;
630
1;
629
__END__
631
__END__
(-)a/t/db_dependent/MarcModificationTemplates.t (-5 / +2 lines)
Lines 1-6 Link Here
1
use Modern::Perl;
1
use Modern::Perl;
2
2
3
use Test::More tests => 77;
3
use Test::More tests => 78;
4
4
5
use_ok("MARC::Field");
5
use_ok("MARC::Field");
6
use_ok("MARC::Record");
6
use_ok("MARC::Record");
Lines 208-220 is( AddModificationTemplateAction( Link Here
208
208
209
my $record = new_record();
209
my $record = new_record();
210
210
211
ModifyRecordWithTemplate( $template_id, $record );
211
is( ModifyRecordWithTemplate( $template_id, $record ), undef, "The ModifyRecordWithTemplate returns undef" );
212
212
213
my $expected_record = expected_record();
213
my $expected_record = expected_record();
214
is_deeply( $record, $expected_record );
214
is_deeply( $record, $expected_record );
215
215
216
done_testing;
217
218
sub new_record {
216
sub new_record {
219
    my $record = MARC::Record->new;
217
    my $record = MARC::Record->new;
220
    $record->leader('03174nam a2200445 a 4500');
218
    $record->leader('03174nam a2200445 a 4500');
221
- 

Return to bug 11395