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

(-)a/installer/data/mysql/atomicupdate/bug_21627.pl (-2 / +4 lines)
Lines 9-20 return { Link Here
9
        my ( $dbh, $out ) = @$args{qw(dbh out)};
9
        my ( $dbh, $out ) = @$args{qw(dbh out)};
10
10
11
        # Do you stuffs here
11
        # Do you stuffs here
12
        $dbh->do(q{
12
        $dbh->do(
13
            q{
13
        INSERT IGNORE INTO systempreferences
14
        INSERT IGNORE INTO systempreferences
14
        (`variable`, `value`, `options`, `explanation`, `type`)
15
        (`variable`, `value`, `options`, `explanation`, `type`)
15
        VALUES
16
        VALUES
16
            ('SendPrintNoticesEmails','','','What email addresses should send_print_notices.pl send to?','Free'),
17
            ('SendPrintNoticesEmails','','','What email addresses should send_print_notices.pl send to?','Free'),
17
            ('SendPrintNoticesCombineEmails','1',NULL,'If we have emails in the flag and the system preference should we combine them or just use the system preference?','YesNo')});
18
            ('SendPrintNoticesCombineEmails','1',NULL,'If we have emails in the flag and the system preference should we combine them or just use the system preference?','YesNo')}
19
        );
18
20
19
        say $out "Added new system preferences 'SendPrintNoticesEmails' and 'SendPrintNoticesCombineEmails";
21
        say $out "Added new system preferences 'SendPrintNoticesEmails' and 'SendPrintNoticesCombineEmails";
20
    },
22
    },
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/prefs-menu.inc (-2 / +3 lines)
Lines 70-78 Link Here
70
            <li class="active">
70
            <li class="active">
71
                <a title="Cronjobs" href="/cgi-bin/koha/admin/preferences.pl?tab=cron">Cronjobs</a>
71
                <a title="Cronjobs" href="/cgi-bin/koha/admin/preferences.pl?tab=cron">Cronjobs</a>
72
                [% PROCESS subtabs %]
72
                [% PROCESS subtabs %]
73
            </li>
73
        [% END %]
74
        [% END %]
74
            <li>
75
        <li>
75
                <a title="Cronjobs" href="/cgi-bin/koha/admin/preferences.pl?tab=cron">Cronjobs</a>
76
            <a title="Cronjobs" href="/cgi-bin/koha/admin/preferences.pl?tab=cron">Cronjobs</a>
76
        </li>
77
        </li>
77
78
78
        [% IF ( enhanced_content ) %]
79
        [% IF ( enhanced_content ) %]
(-)a/misc/cronjobs/gather_print_notices.pl (-15 / +8 lines)
Lines 58-79 if ( !$output_directory || !-d $output_directory || !-w $output_directory ) { Link Here
58
    );
58
    );
59
}
59
}
60
my $sys_pref_emails = C4::Context->preference("SendPrintNoticesEmails");
60
my $sys_pref_emails = C4::Context->preference("SendPrintNoticesEmails");
61
if($sys_pref_emails)
61
if ($sys_pref_emails) {
62
{
62
    my @split_pref_emails = split( /,/, $sys_pref_emails );
63
    my @split_pref_emails = split(/,/, $sys_pref_emails);
63
    my $sys_pref_combine  = C4::Context->preference("SendPrintNoticesCombineEmails");
64
    my $sys_pref_combine = C4::Context->preference("SendPrintNoticesCombineEmails");
64
    if ($sys_pref_combine) {
65
    if($sys_pref_combine)
65
        @emails = ( @emails, @split_pref_emails );
66
    {
66
    } else {
67
        @emails = (@emails, @split_pref_emails);
68
    }
69
    else
70
    {
71
        @emails = @split_pref_emails;
67
        @emails = @split_pref_emails;
72
    }
68
    }
73
}
69
} else {
74
else
70
    cronlogaction( { info => "SendPrintNotices system pref ignored because it was null or empty." } );
75
{
76
    cronlogaction({info => "SendPrintNotices system pref ignored because it was null or empty."});
77
}
71
}
78
72
79
# uncomment the line below to test the system pref even if you have no files to send
73
# uncomment the line below to test the system pref even if you have no files to send
80
- 

Return to bug 21627