Revision 67cecc96
Von Sven Schöling vor mehr als 15 Jahren hinzugefügt
SL/Template.pm | ||
---|---|---|
172 | 172 |
my $sum = 0; |
173 | 173 |
my $current_page = 1; |
174 | 174 |
my ($current_line, $corrent_row) = (0, 1); |
175 |
my $description_array = $self->_get_loop_variable("description",1); |
|
176 |
my $longdescription_array = $self->_get_loop_variable("longdescription",1); |
|
175 | 177 |
|
176 | 178 |
for (my $i = 0; $i < scalar(@{$ary}); $i++) { |
177 | 179 |
$form->{"__first__"} = $i == 0; |
... | ... | |
179 | 181 |
$form->{"__odd__"} = (($i + 1) % 2) == 1; |
180 | 182 |
$form->{"__counter__"} = $i + 1; |
181 | 183 |
|
182 |
if ((scalar(@{$form->{"description"}}) == scalar(@{$ary})) && |
|
183 |
$self->{"chars_per_line"}) { |
|
184 |
my $lines = |
|
185 |
int(length($form->{"description"}->[$i]) / $self->{"chars_per_line"}); |
|
184 |
if (scalar @{$description_array} == scalar @{$ary} && $self->{"chars_per_line"} != 0) { |
|
185 |
my $lines = int(length($description_array->[$i]) / $self->{"chars_per_line"}); |
|
186 | 186 |
my $lpp; |
187 | 187 |
|
188 |
$form->{"description"}->[$i] =~ s/(\\newline\s?)*$//;
|
|
189 |
my $_description = $form->{"description"}->[$i];
|
|
188 |
$description_array->[$i] =~ s/(\\newline\s?)*$//;
|
|
189 |
my $_description = $description_array->[$i];
|
|
190 | 190 |
while ($_description =~ /\\newline/) { |
191 | 191 |
$lines++; |
192 | 192 |
$_description =~ s/\\newline//; |
... | ... | |
200 | 200 |
} |
201 | 201 |
|
202 | 202 |
# Yes we need a manual page break -- or the user has forced one |
203 |
if ((($current_line + $lines) > $lpp) || ($form->{"description"}->[$i] =~ /<pagebreak>/) || ($form->{"longdescription"}->[$i] =~ /<pagebreak>/)) {
|
|
203 |
if ((($current_line + $lines) > $lpp) || ($description_array->[$i] =~ /<pagebreak>/) || ($longdescription_array->[$i] =~ /<pagebreak>/)) {
|
|
204 | 204 |
my $pb = $self->{"pagebreak_block"}; |
205 | 205 |
|
206 | 206 |
# replace the special variables <%sumcarriedforward%> |
Auch abrufbar als: Unified diff
Pagebreaks müssen auch auf _get_loop_variable umgestellt werden.
Fix für Bug 1019.
(Und hey, wenn der in -r4721 nochmal auftaucht, wissen wir das ja jetzt schon :))