Lines 363-382
sub delete_confirm {
Link Here
|
363 |
} |
363 |
} |
364 |
|
364 |
|
365 |
sub delete_confirmed { |
365 |
sub delete_confirmed { |
366 |
my ($branchcode, $module, $code, $mtt, $lang) = @_; |
366 |
my ( $branchcode, $module, $code, $mtt, $lang ) = @_; |
367 |
my $letter = Koha::Notice::Templates->find( |
367 |
my $letters = Koha::Notice::Templates->search( |
368 |
{ |
368 |
{ |
369 |
branchcode => $branchcode || '', |
369 |
branchcode => $branchcode || '', |
370 |
module => $module, |
370 |
module => $module, |
371 |
code => $code, |
371 |
code => $code, |
372 |
message_transport_type => $mtt, |
372 |
( $mtt ? ( message_transport_type => $mtt ) : () ), |
373 |
lang => $lang, |
373 |
( $lang ? ( lang => $lang ) : () ), |
374 |
} |
374 |
} |
375 |
); |
375 |
); |
376 |
if ( $letter ) { |
376 |
while ( my $letter = $letters->next ) { |
377 |
logaction('NOTICES', 'DELETE', $letter->id, $letter->content, 'Intranet'); |
377 |
logaction( 'NOTICES', 'DELETE', $letter->id, $letter->content, |
|
|
378 |
'Intranet' ); |
378 |
$letter->delete; |
379 |
$letter->delete; |
379 |
} |
380 |
} |
|
|
381 |
|
380 |
# setup default display for screen |
382 |
# setup default display for screen |
381 |
default_display($branchcode); |
383 |
default_display($branchcode); |
382 |
return; |
384 |
return; |
383 |
- |
|
|