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

(-)a/C4/Letters.pm (+2 lines)
Lines 926-931 sub _send_message_by_email { Link Here
926
926
927
    my $member = C4::Members::GetMember( 'borrowernumber' => $message->{'borrowernumber'} );
927
    my $member = C4::Members::GetMember( 'borrowernumber' => $message->{'borrowernumber'} );
928
    my $to_address = $message->{'to_address'};
928
    my $to_address = $message->{'to_address'};
929
    my $sendAllEmailsTo = C4::Context->preference('SendAllEmailsTo');
930
    $to_address = $sendAllEmailsTo if ($sendAllEmailsTo && $sendAllEmailsTo =~ /@/ ); # some validation.  This could be improved.
929
    unless ($to_address) {
931
    unless ($to_address) {
930
        unless ($member) {
932
        unless ($member) {
931
            warn "FAIL: No 'to_address' and INVALID borrowernumber ($message->{borrowernumber})";
933
            warn "FAIL: No 'to_address' and INVALID borrowernumber ($message->{borrowernumber})";
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 335-340 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
335
('SelfCheckHelpMessage','','70|10','Enter HTML to include under the basic Web-based Self Checkout instructions on the Help page','Textarea'),
335
('SelfCheckHelpMessage','','70|10','Enter HTML to include under the basic Web-based Self Checkout instructions on the Help page','Textarea'),
336
('SelfCheckReceiptPrompt','1','NULL','If ON, print receipt dialog pops up when self checkout is finished','YesNo'),
336
('SelfCheckReceiptPrompt','1','NULL','If ON, print receipt dialog pops up when self checkout is finished','YesNo'),
337
('SelfCheckTimeout','120','','Define the number of seconds before the Web-based Self Checkout times out a patron','Integer'),
337
('SelfCheckTimeout','120','','Define the number of seconds before the Web-based Self Checkout times out a patron','Integer'),
338
('SendAllEmailsTo','',NULL,'This email will replace the To address in every message sent by the system.  This is meant to help testing only.','Textarea'),
338
('SeparateHoldings','0',NULL,'Separate current branch holdings from other holdings','YesNo'),
339
('SeparateHoldings','0',NULL,'Separate current branch holdings from other holdings','YesNo'),
339
('SeparateHoldingsBranch','homebranch','homebranch|holdingbranch','Branch used to separate holdings','Choice'),
340
('SeparateHoldingsBranch','homebranch','homebranch|holdingbranch','Branch used to separate holdings','Choice'),
340
('SessionStorage','mysql','mysql|Pg|tmp','Use database or a temporary file for storing session data','Choice'),
341
('SessionStorage','mysql','mysql|Pg|tmp','Use database or a temporary file for storing session data','Choice'),
(-)a/installer/data/mysql/updatedatabase.pl (+7 lines)
Lines 7945-7950 if (CheckVersion($DBversion)) { Link Here
7945
    SetVersion($DBversion);
7945
    SetVersion($DBversion);
7946
}
7946
}
7947
7947
7948
$DBversion = "3.15.00.XXX";
7949
if ( CheckVersion($DBversion) ) {
7950
    $dbh->do("INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('SendAllEmailsTo','',NULL,'This email will replace the To address in every message sent by the system.  This is meant to help testing and validation only.','Textarea')");
7951
    print "Upgrade to $DBversion done (Bug 8000 - system preferences to override the destination of every email sent by the system.)\n";
7952
    SetVersion ($DBversion);
7953
}
7954
7948
=head1 FUNCTIONS
7955
=head1 FUNCTIONS
7949
7956
7950
=head2 TableExists($table)
7957
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref (-1 / +5 lines)
Lines 40-45 Administration: Link Here
40
                  yes: Allow
40
                  yes: Allow
41
                  no: "Don't allow"
41
                  no: "Don't allow"
42
            - staff and patrons to create and view saved lists of books.
42
            - staff and patrons to create and view saved lists of books.
43
        -
44
            - Redirect all emails from Koha to 
45
            - pref: SendAllEmailsTo
46
              class: email
47
            - instead of their intended user. 
43
    Login options:
48
    Login options:
44
        -
49
        -
45
            - Automatically log out users after
50
            - Automatically log out users after
46
- 

Return to bug 8000