Lines 46-51
use C4::Auth;
Link Here
|
46 |
use C4::Context; |
46 |
use C4::Context; |
47 |
use C4::Output; |
47 |
use C4::Output; |
48 |
use C4::Letters; |
48 |
use C4::Letters; |
|
|
49 |
use C4::Log; |
49 |
|
50 |
|
50 |
use Koha::Patron::Attribute::Types; |
51 |
use Koha::Patron::Attribute::Types; |
51 |
|
52 |
|
Lines 315-320
sub add_validate {
Link Here
|
315 |
next; |
316 |
next; |
316 |
} |
317 |
} |
317 |
elsif ( $letter and $letter->{message_transport_type} eq $mtt and $letter->{lang} eq $lang ) { |
318 |
elsif ( $letter and $letter->{message_transport_type} eq $mtt and $letter->{lang} eq $lang ) { |
|
|
319 |
logaction('NOTICES', 'REPLACE', $letter->{id}, $letter->{content}, 'Intranet'); |
318 |
$dbh->do( |
320 |
$dbh->do( |
319 |
q{ |
321 |
q{ |
320 |
UPDATE letter |
322 |
UPDATE letter |
Lines 326-336
sub add_validate {
Link Here
|
326 |
$branchcode, $oldmodule, $code, $mtt, $lang |
328 |
$branchcode, $oldmodule, $code, $mtt, $lang |
327 |
); |
329 |
); |
328 |
} else { |
330 |
} else { |
329 |
$dbh->do( |
331 |
my $letter = Koha::Notice::Templates->new( |
330 |
q{INSERT INTO letter (branchcode,module,code,name,is_html,title,content,message_transport_type, lang) VALUES (?,?,?,?,?,?,?,?,?)}, |
332 |
{ |
331 |
undef, |
333 |
branchcode => $branchcode, |
332 |
$branchcode || '', $module, $code, $name, $is_html || 0, $title, $content, $mtt, $lang |
334 |
module => $module, |
333 |
); |
335 |
name => $name, |
|
|
336 |
is_html => $is_html, |
337 |
title => $title, |
338 |
content => $content, |
339 |
message_transport_type => $mtt, |
340 |
lang => $lang |
341 |
} |
342 |
)->store; |
343 |
logaction('NOTICES', 'CREATE', $letter->id, $letter->content, 'Intranet'); |
334 |
} |
344 |
} |
335 |
} |
345 |
} |
336 |
# set up default display |
346 |
# set up default display |
337 |
- |
|
|