Bugzilla – Attachment 82020 Details for
Bug 21241
Set suggestion notices message_transport_type to sms if syspref is enabled and patron has an smsalertnumber but no email address
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21241: (follow-up) Code Golf
Bug-21241-follow-up-Code-Golf.patch (text/plain), 1.51 KB, created by
Martin Renvoize (ashimema)
on 2018-11-07 11:45:53 UTC
(
hide
)
Description:
Bug 21241: (follow-up) Code Golf
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2018-11-07 11:45:53 UTC
Size:
1.51 KB
patch
obsolete
>From 7ecd639c5e009f275acec8a52850e69e3b72c0a1 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Wed, 7 Nov 2018 11:35:36 +0000 >Subject: [PATCH] Bug 21241: (follow-up) Code Golf > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > C4/Suggestions.pm | 13 ++++--------- > 1 file changed, 4 insertions(+), 9 deletions(-) > >diff --git a/C4/Suggestions.pm b/C4/Suggestions.pm >index aa962732a7..b418f06348 100644 >--- a/C4/Suggestions.pm >+++ b/C4/Suggestions.pm >@@ -503,17 +503,12 @@ sub ModSuggestion { > # fetch the entire updated suggestion so that we can populate the letter > my $full_suggestion = GetSuggestion( $suggestion->{suggestionid} ); > my $patron = Koha::Patrons->find( $full_suggestion->{suggestedby} ); >- my $transport; >- #If FallbackToSMSIfNoEmail syspref is enabled and the patron has a smsalertnumber but no email address then set message_transport_type of suggestion notice to sms >+ >+ my $transport = 'email'; > if (C4::Context->preference("FallbackToSMSIfNoEmail")) { >- if (($patron->smsalertnumber) && (!$patron->email)) { >- $transport="sms"; >- } else { >- $transport="email"; >- } >- } else { >- $transport = "email"; >+ $transport = ($patron->smsalertnumber) && (!$patron->email) ? 'sms' : 'email'; > } >+ > if ( > my $letter = C4::Letters::GetPreparedLetter( > module => 'suggestions', >-- >2.19.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 21241
:
77960
|
79189
|
81625
|
81975
|
82014
|
82018
|
82019
| 82020 |
83517