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

(-)a/C4/Letters.pm (-1 / +3 lines)
Lines 1249-1255 sub _get_unsent_messages { Link Here
1249
1249
1250
    my $dbh = C4::Context->dbh();
1250
    my $dbh = C4::Context->dbh();
1251
    my $statement = qq{
1251
    my $statement = qq{
1252
        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
1252
        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
1253
        FROM message_queue mq
1253
        FROM message_queue mq
1254
        LEFT JOIN borrowers b ON b.borrowernumber = mq.borrowernumber
1254
        LEFT JOIN borrowers b ON b.borrowernumber = mq.borrowernumber
1255
        WHERE status = ?
1255
        WHERE status = ?
Lines 1385-1392 sub _send_message_by_email { Link Here
1385
        } else {
1385
        } else {
1386
            $email = Koha::Email->create($params);
1386
            $email = Koha::Email->create($params);
1387
            if ($is_html) {
1387
            if ($is_html) {
1388
                $content .= "<br/>$message->{letter_id}" if $message->{id} && C4::Context->preference('SendLetterIdInEmailNotices');
1388
                $email->html_body( _wrap_html( $content, $subject ) );
1389
                $email->html_body( _wrap_html( $content, $subject ) );
1389
            } else {
1390
            } else {
1391
                $content .= "\n$message->{letter_id}" if $message->{id} && C4::Context->preference('SendLetterIdInEmailNotices');
1390
                $email->text_body($content);
1392
                $email->text_body($content);
1391
            }
1393
            }
1392
        }
1394
        }
(-)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 645-650 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
645
('SelfCheckReceiptPrompt','1','NULL','If ON, print receipt dialog pops up when self checkout is finished','YesNo'),
645
('SelfCheckReceiptPrompt','1','NULL','If ON, print receipt dialog pops up when self checkout is finished','YesNo'),
646
('SelfCheckTimeout','120','','Define the number of seconds before the Web-based Self Checkout times out a patron','Integer'),
646
('SelfCheckTimeout','120','','Define the number of seconds before the Web-based Self Checkout times out a patron','Integer'),
647
('SendAllEmailsTo','',NULL,'All emails will be redirected to this email if it is not empty','free'),
647
('SendAllEmailsTo','',NULL,'All emails will be redirected to this email if it is not empty','free'),
648
('SendLetterIdInEmailNotices','0',NULL,'Add template id to bottom of emailed notices','YesNo'),
648
('SeparateHoldings','0',NULL,'Separate current branch holdings from other holdings','YesNo'),
649
('SeparateHoldings','0',NULL,'Separate current branch holdings from other holdings','YesNo'),
649
('SeparateHoldingsBranch','homebranch','homebranch|holdingbranch','Branch used to separate holdings','Choice'),
650
('SeparateHoldingsBranch','homebranch','homebranch|holdingbranch','Branch used to separate holdings','Choice'),
650
('SessionRestrictionByIP','1','Check for change in remote IP address for session security. Disable only when remote IP address changes frequently.','','YesNo'),
651
('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