1 # @tag: convert_columns_to_html_for_sending_html_emails
2 # @description: Versand von E-Mails in HTML: mehrere Text-Spalten nach HTML umwandeln
3 # @depends: release_3_5_8
4 package SL::DBUpgrade2::Auth::convert_columns_to_html_for_sending_html_emails;
9 use parent qw(SL::DBUpgrade2::Base);
17 SELECT user_id, cfg_key, cfg_value
19 WHERE (cfg_key = 'signature')
23 UPDATE auth.user_config
26 AND (cfg_key = 'signature')
29 my $h_fetch = $self->dbh->prepare($q_fetch);
30 $h_fetch->execute || $::form->dberror($q_fetch);
32 my $h_update = $self->dbh->prepare($q_update);
34 while (my $entry = $h_fetch->fetchrow_hashref) {
35 $entry->{cfg_value} //= '';
36 my $new_value = SL::HTML::Util->plain_text_to_html($entry->{cfg_value});
38 next if $entry->{cfg_value} eq $new_value;
40 $h_update->execute($new_value, $entry->{user_id}) || $::form->dberror($q_update);