Revision 2e97532c
Von Jan Büren vor etwa 6 Jahren hinzugefügt
SL/IC.pm | ||
---|---|---|
954 | 954 |
return %template_arrays; |
955 | 955 |
} |
956 | 956 |
|
957 |
sub normalize_text_blocks { |
|
958 |
$main::lxdebug->enter_sub(); |
|
959 |
|
|
960 |
my $self = shift; |
|
961 |
my %params = @_; |
|
962 |
|
|
963 |
my $form = $params{form} || $main::form; |
|
964 |
|
|
965 |
# check if feature is enabled (select normalize_part_descriptions from defaults) |
|
966 |
return unless ($::instance_conf->get_normalize_part_descriptions); |
|
967 |
|
|
968 |
foreach (qw(description notes)) { |
|
969 |
$form->{$_} =~ s/\s+$//s; |
|
970 |
$form->{$_} =~ s/^\s+//s; |
|
971 |
$form->{$_} =~ s/ {2,}/ /g; |
|
972 |
} |
|
973 |
$main::lxdebug->leave_sub(); |
|
974 |
} |
|
975 |
|
|
976 |
|
|
977 | 957 |
1; |
Auch abrufbar als: Unified diff
Fixt #349 (Normalisierung Artikel) - normalize_text_blocks nach Part-Controller migriert