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

(-)a/C4/Letters.pm (-1 / +3 lines)
Lines 1246-1252 sub _get_unsent_messages { Link Here
1246
1246
1247
    my $dbh = C4::Context->dbh();
1247
    my $dbh = C4::Context->dbh();
1248
    my $statement = qq{
1248
    my $statement = qq{
1249
        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
1249
        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
1250
        FROM message_queue mq
1250
        FROM message_queue mq
1251
        LEFT JOIN borrowers b ON b.borrowernumber = mq.borrowernumber
1251
        LEFT JOIN borrowers b ON b.borrowernumber = mq.borrowernumber
1252
        WHERE status = ?
1252
        WHERE status = ?
Lines 1378-1385 sub _send_message_by_email { Link Here
1378
        } else {
1378
        } else {
1379
            $email = Koha::Email->create($params);
1379
            $email = Koha::Email->create($params);
1380
            if ($is_html) {
1380
            if ($is_html) {
1381
                $content .= "<br/>$message->{letter_id}" if $message->{id} && C4::Context->preference('SendLetterIdNotices');
1381
                $email->html_body( _wrap_html( $content, $subject ) );
1382
                $email->html_body( _wrap_html( $content, $subject ) );
1382
            } else {
1383
            } else {
1384
                $content .= "\n$message->{letter_id}" if $message->{id} && C4::Context->preference('SendLetterIdNotices');
1383
                $email->text_body($content);
1385
                $email->text_body($content);
1384
            }
1386
            }
1385
        }
1387
        }
(-)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 640-645 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
640
('SelfCheckReceiptPrompt','1','NULL','If ON, print receipt dialog pops up when self checkout is finished','YesNo'),
640
('SelfCheckReceiptPrompt','1','NULL','If ON, print receipt dialog pops up when self checkout is finished','YesNo'),
641
('SelfCheckTimeout','120','','Define the number of seconds before the Web-based Self Checkout times out a patron','Integer'),
641
('SelfCheckTimeout','120','','Define the number of seconds before the Web-based Self Checkout times out a patron','Integer'),
642
('SendAllEmailsTo','',NULL,'All emails will be redirected to this email if it is not empty','free'),
642
('SendAllEmailsTo','',NULL,'All emails will be redirected to this email if it is not empty','free'),
643
('SendLetterIdInEmailNotices','0',NULL,'Add template id to bottom of emailed notices','YesNo'),
643
('SeparateHoldings','0',NULL,'Separate current branch holdings from other holdings','YesNo'),
644
('SeparateHoldings','0',NULL,'Separate current branch holdings from other holdings','YesNo'),
644
('SeparateHoldingsBranch','homebranch','homebranch|holdingbranch','Branch used to separate holdings','Choice'),
645
('SeparateHoldingsBranch','homebranch','homebranch|holdingbranch','Branch used to separate holdings','Choice'),
645
('SessionRestrictionByIP','1','Check for change in remote IP address for session security. Disable only when remote IP address changes frequently.','','YesNo'),
646
('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 160-165 Patrons: Link Here
160
               0: "Don't send"
160
               0: "Don't send"
161
         - an email to newly created patrons.
161
         - an email to newly created patrons.
162
         - '<br><strong>NOTE:</strong> This uses the WELCOME notice.'
162
         - '<br><strong>NOTE:</strong> This uses the WELCOME notice.'
163
     -
164
         - pref: SendLetterIdInEmailNotices
165
           choices:
166
               1: Add
167
               0: "Don't add"
168
         - the template id for a notice to the bottom of any emailed notices.
163
     -
169
     -
164
         - pref: UseEmailReceipts
170
         - pref: UseEmailReceipts
165
           choices:
171
           choices:
166
- 

Return to bug 31627