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

(-)a/C4/Letters.pm (-1 / +3 lines)
Lines 1267-1273 sub _get_unsent_messages { Link Here
1267
1267
1268
    my $dbh = C4::Context->dbh();
1268
    my $dbh = C4::Context->dbh();
1269
    my $statement = qq{
1269
    my $statement = qq{
1270
        SELECT mq.message_id, mq.borrowernumber, mq.subject, mq.content, mq.message_transport_type, mq.status, mq.time_queued, mq.from_address, mq.reply_address, mq.to_address, mq.content_type, b.branchcode, mq.letter_code, mq.failure_code
1270
        SELECT mq.message_id, mq.borrowernumber, mq.subject, mq.content, mq.message_transport_type, mq.status, mq.time_queued, mq.from_address, mq.reply_address, mq.to_address, mq.content_type, b.branchcode, mq.letter_code, mq.failure_code, mq.letter_id
1271
        FROM message_queue mq
1271
        FROM message_queue mq
1272
        LEFT JOIN borrowers b ON b.borrowernumber = mq.borrowernumber
1272
        LEFT JOIN borrowers b ON b.borrowernumber = mq.borrowernumber
1273
        WHERE status = ?
1273
        WHERE status = ?
Lines 1416-1423 sub _send_message_by_email { Link Here
1416
        } else {
1416
        } else {
1417
            $email = Koha::Email->create($params);
1417
            $email = Koha::Email->create($params);
1418
            if ($is_html) {
1418
            if ($is_html) {
1419
                $content .= "<br/>$message->{letter_id}" if $message->{id} && C4::Context->preference('SendLetterIdInEmailNotices');
1419
                $email->html_body( _wrap_html( $content, $subject ) );
1420
                $email->html_body( _wrap_html( $content, $subject ) );
1420
            } else {
1421
            } else {
1422
                $content .= "\n$message->{letter_id}" if $message->{id} && C4::Context->preference('SendLetterIdInEmailNotices');
1421
                $email->text_body($content);
1423
                $email->text_body($content);
1422
            }
1424
            }
1423
        }
1425
        }
(-)a/installer/data/mysql/atomicupdate/bug_31627.pl (+14 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number => "31627",
5
    description => "Add syspref SendLetterIdInEmailNotices",
6
    up => sub {
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
        $dbh->do(q{
10
            INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES
11
            ('SendLetterIdInEmailNotices','0',NULL,'Add template id to bottom of emailed notices','YesNo')
12
        });
13
    },
14
};
(-)a/installer/data/mysql/mandatory/sysprefs.sql (+1 lines)
Lines 660-665 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
660
('SelfCheckReceiptPrompt','1','NULL','If ON, print receipt dialog pops up when self checkout is finished','YesNo'),
660
('SelfCheckReceiptPrompt','1','NULL','If ON, print receipt dialog pops up when self checkout is finished','YesNo'),
661
('SelfCheckTimeout','120','','Define the number of seconds before the Web-based Self Checkout times out a patron','Integer'),
661
('SelfCheckTimeout','120','','Define the number of seconds before the Web-based Self Checkout times out a patron','Integer'),
662
('SendAllEmailsTo','',NULL,'All emails will be redirected to this email if it is not empty','free'),
662
('SendAllEmailsTo','',NULL,'All emails will be redirected to this email if it is not empty','free'),
663
('SendLetterIdInEmailNotices','0',NULL,'Add template id to bottom of emailed notices','YesNo'),
663
('SeparateHoldings','0',NULL,'Separate current branch holdings from other holdings','YesNo'),
664
('SeparateHoldings','0',NULL,'Separate current branch holdings from other holdings','YesNo'),
664
('SeparateHoldingsBranch','homebranch','homebranch|holdingbranch','Branch used to separate holdings','Choice'),
665
('SeparateHoldingsBranch','homebranch','homebranch|holdingbranch','Branch used to separate holdings','Choice'),
665
('SessionRestrictionByIP','1','Check for change in remote IP address for session security. Disable only when remote IP address changes frequently.','','YesNo'),
666
('SessionRestrictionByIP','1','Check for change in remote IP address for session security. Disable only when remote IP address changes frequently.','','YesNo'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref (-1 / +6 lines)
Lines 166-171 Patrons: Link Here
166
               1: Notify
166
               1: Notify
167
               0: "Don't notify"
167
               0: "Don't notify"
168
         - patrons whenever their password is changed.
168
         - patrons whenever their password is changed.
169
     -
170
         - pref: SendLetterIdInEmailNotices
171
           choices:
172
               1: Add
173
               0: "Don't add"
174
         - the template id for a notice to the bottom of any emailed notices.
169
     -
175
     -
170
         - pref: UseEmailReceipts
176
         - pref: UseEmailReceipts
171
           choices:
177
           choices:
172
- 

Return to bug 31627