diff --git a/src/lib/Sympa/List.pm b/src/lib/Sympa/List.pm index 374e67ea9..279389b52 100644 --- a/src/lib/Sympa/List.pm +++ b/src/lib/Sympa/List.pm @@ -1388,7 +1388,6 @@ sub get_recipients_per_mode { my (@tabrcpt_mail, @tabrcpt_mail_verp, @tabrcpt_notice, @tabrcpt_notice_verp, @tabrcpt_txt, @tabrcpt_txt_verp, - @tabrcpt_html, @tabrcpt_html_verp, @tabrcpt_urlize, @tabrcpt_urlize_verp, @tabrcpt_digestplain, @tabrcpt_digestplain_verp, @tabrcpt_digest, @tabrcpt_digest_verp, @@ -1486,12 +1485,6 @@ sub get_recipients_per_mode { } else { push @tabrcpt_txt, $user->{'email'}; } - } elsif ($user->{'reception'} eq 'html') { - if ($user->{'bounce_address'}) { - push @tabrcpt_html_verp, $user->{'email'}; - } else { - push @tabrcpt_html, $user->{'email'}; - } } elsif ($user->{'reception'} eq 'urlize') { if ($user->{'bounce_address'}) { push @tabrcpt_urlize_verp, $user->{'email'}; @@ -1511,12 +1504,10 @@ sub get_recipients_per_mode { unless @tabrcpt_mail or @tabrcpt_notice or @tabrcpt_txt - or @tabrcpt_html or @tabrcpt_urlize or @tabrcpt_mail_verp or @tabrcpt_notice_verp or @tabrcpt_txt_verp - or @tabrcpt_html_verp or @tabrcpt_urlize_verp; my $available_recipients; @@ -1532,10 +1523,6 @@ sub get_recipients_per_mode { $available_recipients->{'txt'}{'noverp'} = \@tabrcpt_txt if @tabrcpt_txt; $available_recipients->{'txt'}{'verp'} = \@tabrcpt_txt_verp if @tabrcpt_txt_verp; - $available_recipients->{'html'}{'noverp'} = \@tabrcpt_html - if @tabrcpt_html; - $available_recipients->{'html'}{'verp'} = \@tabrcpt_html_verp - if @tabrcpt_html_verp; $available_recipients->{'urlize'}{'noverp'} = \@tabrcpt_urlize if @tabrcpt_urlize; $available_recipients->{'urlize'}{'verp'} = \@tabrcpt_urlize_verp @@ -8891,9 +8878,10 @@ sub is_msg_topic_tagging_required { #################################################### # Select users subscribed to a topic that is in # the topic list incoming when reception mode is 'mail', 'notice', 'not_me', -# 'txt', 'html' or 'urlize', and the other +# 'txt' or 'urlize', and the other # subscribers (recpetion mode different from 'mail'), 'mail' and no topic -# subscription +# subscription. +# Note: 'html' mode was deprecated as of 6.2.23b.2. # # IN : -$self(+) : ref(List) # -$string_topic(+) : string splitted by ',' diff --git a/src/lib/Sympa/ListDef.pm b/src/lib/Sympa/ListDef.pm index 37343af38..bbeb831d0 100644 --- a/src/lib/Sympa/ListDef.pm +++ b/src/lib/Sympa/ListDef.pm @@ -394,14 +394,15 @@ our %pinfo = ( 'Only these modes will be allowed for the subscribers of this list. If a subscriber has a reception mode not in the list, Sympa uses the mode specified in the default_user_options paragraph.', 'format' => [ 'mail', 'notice', 'digest', 'digestplain', - 'summary', 'nomail', 'txt', 'html', - 'urlize', 'not_me' + 'summary', 'nomail', 'txt', 'urlize', + 'not_me' ], + 'synonym' => {'html' => 'mail'}, 'field_type' => 'reception', 'occurrence' => '1-n', 'split_char' => ',', 'default' => - 'mail,notice,digest,digestplain,summary,nomail,txt,html,urlize,not_me' + 'mail,notice,digest,digestplain,summary,nomail,txt,urlize,not_me' } } }, @@ -419,9 +420,10 @@ our %pinfo = ( 'gettext_comment' => 'Mail reception mode.', 'format' => [ 'mail', 'notice', 'digest', 'digestplain', - 'summary', 'nomail', 'txt', 'html', - 'urlize', 'not_me' + 'summary', 'nomail', 'txt', 'urlize', + 'not_me' ], + 'synonym' => {'html' => 'mail'}, 'field_type' => 'reception', 'occurrence' => '1', 'default' => 'mail' diff --git a/src/lib/Sympa/ListOpt.pm b/src/lib/Sympa/ListOpt.pm index 9da1f64af..b51f2baca 100644 --- a/src/lib/Sympa/ListOpt.pm +++ b/src/lib/Sympa/ListOpt.pm @@ -237,7 +237,6 @@ my %reception_mode = ( 'summary' => {'gettext_id' => 'summary mode'}, 'notice' => {'gettext_id' => 'notice mode'}, 'txt' => {'gettext_id' => 'text-only mode'}, - 'html' => {'gettext_id' => 'html-only mode'}, 'urlize' => {'gettext_id' => 'urlize mode'}, 'nomail' => {'gettext_id' => 'no mail'}, 'not_me' => {'gettext_id' => 'not receiving your own posts'} diff --git a/src/lib/Sympa/Message.pm b/src/lib/Sympa/Message.pm index 37acd6e7d..c8d9a11ab 100644 --- a/src/lib/Sympa/Message.pm +++ b/src/lib/Sympa/Message.pm @@ -1424,16 +1424,7 @@ sub prepare_message_according_to_mode { my $robot_id = $list->{'domain'}; - if ($mode eq 'mail') { - ##Prepare message for normal reception mode - ## Add a footer - unless ($self->{'protected'}) { - my $entity = $self->as_entity->dup; - - _decorate_parts($entity, $list); - $self->set_entity($entity); - } - } elsif ($mode eq 'nomail' + if ($mode eq 'nomail' or $mode eq 'summary' or $mode eq 'digest' or $mode eq 'digestplain') { @@ -1455,16 +1446,6 @@ sub prepare_message_according_to_mode { ## Add a footer _decorate_parts($entity, $list); $self->set_entity($entity); - } elsif ($mode eq 'html') { - ##Prepare message for html reception mode - my $entity = $self->as_entity->dup; - - if (_as_singlepart($entity, 'text/html')) { - $log->syslog('notice', 'Multipart message changed to singlepart'); - } - ## Add a footer - _decorate_parts($entity, $list); - $self->set_entity($entity); } elsif ($mode eq 'urlize') { # Prepare message for urlize reception mode. # Not extract message/rfc822 parts. @@ -1482,8 +1463,15 @@ sub prepare_message_according_to_mode { ## Add a footer _decorate_parts($entity, $list); $self->set_entity($entity); - } else { - die sprintf 'Unknown variable/reception mode %s', $mode; + } else { # 'mail' + # Prepare message for normal reception mode, + # and add a footer. + unless ($self->{'protected'}) { + my $entity = $self->as_entity->dup; + + _decorate_parts($entity, $list); + $self->set_entity($entity); + } } return $self; @@ -3712,7 +3700,8 @@ Customized text, or C if error occurred. I. Transforms the message according to reception mode: -C<'mail'>, C<'notice'>, C<'txt'> or C<'html'>. +C<'mail'>, C<'notice'> or C<'txt'>. +Note: 'html' mode was deprecated as of 6.2.23b.2. By C<'nomail'>, C<'digest'>, C<'digestplain'> or C<'summary'> mode, the message is not modified.