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

(-)a/installer/data/mysql/atomicupdate/add-system-preference-EmailOverduesNoEmail.perl (-5 / +5 lines)
Lines 1-15 Link Here
1
use Modern::Perl;
1
use Modern::Perl;
2
 
2
3
{
3
return {
4
    bug_number => "20076",
4
    bug_number => "20076",
5
    description => "Add system preference EmailOverduesNoEmail",
5
    description => "Add system preference EmailOverduesNoEmail",
6
    up => sub {
6
    up => sub {
7
        my ($args) = @_;
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
 
9
10
        $dbh->do(q{
10
        $dbh->do(q{
11
            INSERT IGNORE INTO systempreferences (`variable`,`value`,`options`,`explanation`,`type`)
11
            INSERT IGNORE INTO systempreferences (`variable`,`value`,`options`,`explanation`,`type`)
12
            VALUES ('EmailOverduesNoEmail','1','','Send send overdues of patrons without email address to staff', 'YesNo')
12
            VALUES ('EmailOverduesNoEmail','1',NULL,'Send send overdues of patrons without email address to staff', 'YesNo')
13
            });
13
        });
14
    },
14
    },
15
}
15
}
(-)a/installer/data/mysql/mandatory/sysprefs.sql (-1 / +1 lines)
Lines 193-199 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
193
('ElasticsearchCrossFields', '1', '', 'Enable "cross_fields" option for searches using Elastic search.', 'YesNo'),
193
('ElasticsearchCrossFields', '1', '', 'Enable "cross_fields" option for searches using Elastic search.', 'YesNo'),
194
('EmailAddressForSuggestions','','',' If you choose EmailAddressForSuggestions you have to enter a valid email address: ','free'),
194
('EmailAddressForSuggestions','','',' If you choose EmailAddressForSuggestions you have to enter a valid email address: ','free'),
195
('emailLibrarianWhenHoldIsPlaced','0',NULL,'If ON, emails the librarian whenever a hold is placed','YesNo'),
195
('emailLibrarianWhenHoldIsPlaced','0',NULL,'If ON, emails the librarian whenever a hold is placed','YesNo'),
196
('EmailOverduesNoEmail','0',NULL,'Send send overdues of patrons without email address to staff','YesNo'),
196
('EmailOverduesNoEmail','1',NULL,'Send send overdues of patrons without email address to staff','YesNo'),
197
('EmailPurchaseSuggestions','0','0|EmailAddressForSuggestions|BranchEmailAddress|KohaAdminEmailAddress','Choose email address that new purchase suggestions will be sent to: ','Choice'),
197
('EmailPurchaseSuggestions','0','0|EmailAddressForSuggestions|BranchEmailAddress|KohaAdminEmailAddress','Choose email address that new purchase suggestions will be sent to: ','Choice'),
198
('EnableAdvancedCatalogingEditor','0','','Enable the Rancor advanced cataloging editor','YesNo'),
198
('EnableAdvancedCatalogingEditor','0','','Enable the Rancor advanced cataloging editor','YesNo'),
199
('EnableBorrowerFiles','0',NULL,'If enabled, allows librarians to upload and attach arbitrary files to a borrower record.','YesNo'),
199
('EnableBorrowerFiles','0',NULL,'If enabled, allows librarians to upload and attach arbitrary files to a borrower record.','YesNo'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref (-2 / +2 lines)
Lines 80-87 Administration: Link Here
80
        -
80
        -
81
            - pref: EmailOverduesNoEmail
81
            - pref: EmailOverduesNoEmail
82
              choices:
82
              choices:
83
                  1: "Don't send"
83
                  1: "Send"
84
                  0: "Send"
84
                  0: "Don't send"
85
            - "overdue notices for patrons without email address to staff."
85
            - "overdue notices for patrons without email address to staff."
86
86
87
    Login options:
87
    Login options:
(-)a/misc/cronjobs/overdue_notices.pl (-4 / +1 lines)
Lines 368-374 if (@branchcodes) { Link Here
368
        my $branch_word = scalar @branches > 1 ? 'branches' : 'branch';
368
        my $branch_word = scalar @branches > 1 ? 'branches' : 'branch';
369
    $verbose and warn "$branch_word @branches have overdue rules\n";
369
    $verbose and warn "$branch_word @branches have overdue rules\n";
370
370
371
372
    } else {
371
    } else {
373
    
372
    
374
        $verbose and warn "No active overduerules for $branchcodes_word  '@branchcodes'\n";
373
        $verbose and warn "No active overduerules for $branchcodes_word  '@branchcodes'\n";
Lines 842-849 END_SQL Link Here
842
        }
841
        }
843
        $content .= join( "\n", @output_chunks );
842
        $content .= join( "\n", @output_chunks );
844
843
845
        my $EmailOverduesNoEmail = C4::Context->preference('EmailOverduesNoEmail');
844
        if ( C4::Context->preference('EmailOverduesNoEmail') ) {
846
        if ( $EmailOverduesNoEmail == 0) {
847
            my $attachment = {
845
            my $attachment = {
848
                filename => defined $csvfilename ? 'attachment.csv' : 'attachment.txt',
846
                filename => defined $csvfilename ? 'attachment.csv' : 'attachment.txt',
849
                type => 'text/plain',
847
                type => 'text/plain',
850
- 

Return to bug 20076