Bug 20912: (QA follow-up) Rebase error corrections
[koha.git] / C4 / Suggestions.pm
index aa96273..e2dd3e7 100644 (file)
@@ -503,17 +503,9 @@ 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
-        if (C4::Context->preference("FallbackToSMSIfNoEmail")) {
-            if (($patron->smsalertnumber) && (!$patron->email)) {
-                $transport="sms";
-            } else {
-                $transport="email";
-            }
-        } else {
-            $transport = "email";
-        }
+
+        my $transport = (C4::Context->preference("FallbackToSMSIfNoEmail")) && ($patron->smsalertnumber) && (!$patron->email) ? 'sms' : 'email';
+
         if (
             my $letter = C4::Letters::GetPreparedLetter(
                 module      => 'suggestions',