Lines 921-933
sub EnqueueLetter {
Link Here
|
921 |
my $dbh = C4::Context->dbh(); |
921 |
my $dbh = C4::Context->dbh(); |
922 |
my $statement = << 'ENDSQL'; |
922 |
my $statement = << 'ENDSQL'; |
923 |
INSERT INTO message_queue |
923 |
INSERT INTO message_queue |
924 |
( borrowernumber, subject, content, metadata, letter_code, message_transport_type, status, time_queued, to_address, from_address, reply_address, content_type, failure_code ) |
924 |
( letter_id, borrowernumber, subject, content, metadata, letter_code, message_transport_type, status, time_queued, to_address, from_address, reply_address, content_type, failure_code ) |
925 |
VALUES |
925 |
VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, CAST(NOW() AS DATETIME), ?, ?, ?, ?, ? ) |
926 |
( ?, ?, ?, ?, ?, ?, ?, CAST(NOW() AS DATETIME), ?, ?, ?, ?, ? ) |
|
|
927 |
ENDSQL |
926 |
ENDSQL |
928 |
|
927 |
|
929 |
my $sth = $dbh->prepare($statement); |
928 |
my $sth = $dbh->prepare($statement); |
930 |
my $result = $sth->execute( |
929 |
my $result = $sth->execute( |
|
|
930 |
$params->{letter}->{id} || undef, # letter.id |
931 |
$params->{'borrowernumber'}, # borrowernumber |
931 |
$params->{'borrowernumber'}, # borrowernumber |
932 |
$params->{'letter'}->{'title'}, # subject |
932 |
$params->{'letter'}->{'title'}, # subject |
933 |
$params->{'letter'}->{'content'}, # content |
933 |
$params->{'letter'}->{'content'}, # content |