From 0b7ac37a28bac97f086c262e51645fb1fec31b31 Mon Sep 17 00:00:00 2001 From: Lari Taskula Date: Tue, 13 Jun 2017 17:49:54 +0300 Subject: [PATCH] Bug 17499: (follow-up) Add information on digest being the only option to get_options If a library wants to force digest on a message type, add this information to Koha::Patron::Message::Preferences->get_options. --- Koha/Patron/Message/Preferences.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Koha/Patron/Message/Preferences.pm b/Koha/Patron/Message/Preferences.pm index 5a78458..dc96bfc 100644 --- a/Koha/Patron/Message/Preferences.pm +++ b/Koha/Patron/Message/Preferences.pm @@ -86,7 +86,8 @@ sub get_options { $choices->{$name}->{'message_attribute_id'} = $transport->message_attribute_id; $choices->{$name}->{'message_name'} = $name; $choices->{$name}->{'takes_days'} = $transport->get_column('takes_days'); - $choices->{$name}->{'has_digest'} = 1 if $transport->is_digest; + $choices->{$name}->{'has_digest'} = $transport->is_digest ? 1 : 0; + $choices->{$name}->{'has_digest_off'} = !$transport->is_digest ? 1 : 0; $choices->{$name}->{'transport_'.$transport->get_column('message_transport_type')} = ' '; } -- 2.7.4