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

(-)a/C4/Suggestions.pm (-4 / +1 lines)
Lines 504-513 sub ModSuggestion { Link Here
504
        my $full_suggestion = GetSuggestion( $suggestion->{suggestionid} );
504
        my $full_suggestion = GetSuggestion( $suggestion->{suggestionid} );
505
        my $patron = Koha::Patrons->find( $full_suggestion->{suggestedby} );
505
        my $patron = Koha::Patrons->find( $full_suggestion->{suggestedby} );
506
506
507
        my $transport = 'email';
507
        my $transport = (C4::Context->preference("FallbackToSMSIfNoEmail")) && ($patron->smsalertnumber) && (!$patron->email) ? 'sms' : 'email';
508
        if (C4::Context->preference("FallbackToSMSIfNoEmail")) {
509
            $transport = ($patron->smsalertnumber) && (!$patron->email) ? 'sms' : 'email';
510
        }
511
508
512
        if (
509
        if (
513
            my $letter = C4::Letters::GetPreparedLetter(
510
            my $letter = C4::Letters::GetPreparedLetter(
(-)a/installer/data/mysql/atomicupdate/bug_21241-add_syspref_to_control_fallback_to_sms_if_no_email_defined.sql (-1 / +1 lines)
Line 1 Link Here
1
INSERT INTO systempreferences (variable, value, options, explanation, type) VALUES ('FallbackToSMSIfNoEmail', 0, 'Enable|Disable', 'Send messages by SMS if no patron email is defined', 'YesNo');
1
INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type) VALUES ('FallbackToSMSIfNoEmail', 0, 'Enable|Disable', 'Send messages by SMS if no patron email is defined', 'YesNo');
(-)a/installer/data/mysql/sysprefs.sql (-1 / +1 lines)
Lines 173-178 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
173
('FacetLabelTruncationLength','20',NULL,'Specify the facet max length in OPAC','Integer'),
173
('FacetLabelTruncationLength','20',NULL,'Specify the facet max length in OPAC','Integer'),
174
('FacetMaxCount','20',NULL,'Specify the max facet count for each category','Integer'),
174
('FacetMaxCount','20',NULL,'Specify the max facet count for each category','Integer'),
175
('FailedLoginAttempts','','','Number of login attempts before lockout the patron account','Integer'),
175
('FailedLoginAttempts','','','Number of login attempts before lockout the patron account','Integer'),
176
('FallbackToSMSIfNoEmail', 0, 'Enable|Disable', 'Send messages by SMS if no patron email is defined', 'YesNo'),
176
('FeeOnChangePatronCategory','1','','If set, when a patron changes to a category with enrolment fee, a fee is charged','YesNo'),
177
('FeeOnChangePatronCategory','1','','If set, when a patron changes to a category with enrolment fee, a fee is charged','YesNo'),
177
('FilterBeforeOverdueReport','0','','Do not run overdue report until filter selected','YesNo'),
178
('FilterBeforeOverdueReport','0','','Do not run overdue report until filter selected','YesNo'),
178
('FineNotifyAtCheckin','0',NULL,'If ON notify librarians of overdue fines on the items they are checking in.','YesNo'),
179
('FineNotifyAtCheckin','0',NULL,'If ON notify librarians of overdue fines on the items they are checking in.','YesNo'),
179
- 

Return to bug 21241