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

(-)a/C4/Letters.pm (+2 lines)
Lines 922-927 sub _send_message_by_email { Link Here
922
922
923
    my $member = C4::Members::GetMember( 'borrowernumber' => $message->{'borrowernumber'} );
923
    my $member = C4::Members::GetMember( 'borrowernumber' => $message->{'borrowernumber'} );
924
    my $to_address = $message->{'to_address'};
924
    my $to_address = $message->{'to_address'};
925
    my $sendAllEmailsTo = C4::Context->preference('SendAllEmailsTo');
926
    $to_address = $sendAllEmailsTo if ($sendAllEmailsTo && $sendAllEmailsTo =~ /@/ ); # some validation.  This could be improved.
925
    unless ($to_address) {
927
    unless ($to_address) {
926
        unless ($member) {
928
        unless ($member) {
927
            warn "FAIL: No 'to_address' and INVALID borrowernumber ($message->{borrowernumber})";
929
            warn "FAIL: No 'to_address' and INVALID borrowernumber ($message->{borrowernumber})";
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 328-333 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
328
('SearchMyLibraryFirst','0',NULL,'If ON, OPAC searches return results limited by the user\'s library by default if they are logged in','YesNo'),
328
('SearchMyLibraryFirst','0',NULL,'If ON, OPAC searches return results limited by the user\'s library by default if they are logged in','YesNo'),
329
('SelfCheckHelpMessage','','70|10','Enter HTML to include under the basic Web-based Self Checkout instructions on the Help page','Textarea'),
329
('SelfCheckHelpMessage','','70|10','Enter HTML to include under the basic Web-based Self Checkout instructions on the Help page','Textarea'),
330
('SelfCheckTimeout','120','','Define the number of seconds before the Web-based Self Checkout times out a patron','Integer'),
330
('SelfCheckTimeout','120','','Define the number of seconds before the Web-based Self Checkout times out a patron','Integer'),
331
('SendAllEmailsTo','',NULL,'This email will replace the To address in every message sent by the system.  This is meant to help testing only.','Textarea'),
331
('SeparateHoldings','0',NULL,'Separate current branch holdings from other holdings','YesNo'),
332
('SeparateHoldings','0',NULL,'Separate current branch holdings from other holdings','YesNo'),
332
('SeparateHoldingsBranch','homebranch','homebranch|holdingbranch','Branch used to separate holdings','Choice'),
333
('SeparateHoldingsBranch','homebranch','homebranch|holdingbranch','Branch used to separate holdings','Choice'),
333
('SessionStorage','mysql','mysql|Pg|tmp','Use database or a temporary file for storing session data','Choice'),
334
('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 7169-7174 if ( CheckVersion($DBversion) ) { Link Here
7169
    SetVersion ($DBversion);
7169
    SetVersion ($DBversion);
7170
}
7170
}
7171
7171
7172
$DBversion = "3.13.00.XXX";
7173
if ( CheckVersion($DBversion) ) {
7174
    $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 only.','Textarea')");
7175
    print "Upgrade to $DBversion done (Bug 8000 - system preferences to override the destination of every email sent by the system.)\n";
7176
    SetVersion ($DBversion);
7177
}
7178
7172
=head1 FUNCTIONS
7179
=head1 FUNCTIONS
7173
7180
7174
=head2 TableExists($table)
7181
=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