Revision 560d94b2
Von Jan Büren vor mehr als 15 Jahren hinzugefügt
SL/Form.pm | ||
---|---|---|
195 | 195 |
} |
196 | 196 |
|
197 | 197 |
sub _recode_recursively { |
198 |
$main::lxdebug->enter_sub(); |
|
198 | 199 |
my ($iconv, $param) = @_; |
199 | 200 |
|
200 | 201 |
if (ref $param eq 'HASH') { |
... | ... | |
215 | 216 |
} |
216 | 217 |
} |
217 | 218 |
} |
219 |
$main::lxdebug->leave_sub(); |
|
218 | 220 |
} |
219 | 221 |
|
220 | 222 |
sub new { |
... | ... | |
394 | 396 |
} |
395 | 397 |
|
396 | 398 |
sub quote { |
399 |
$main::lxdebug->enter_sub(); |
|
397 | 400 |
my ($self, $str) = @_; |
398 | 401 |
|
399 | 402 |
if ($str && !ref($str)) { |
... | ... | |
402 | 405 |
|
403 | 406 |
$str; |
404 | 407 |
|
408 |
$main::lxdebug->leave_sub(); |
|
405 | 409 |
} |
406 | 410 |
|
407 | 411 |
sub unquote { |
412 |
$main::lxdebug->enter_sub(); |
|
408 | 413 |
my ($self, $str) = @_; |
409 | 414 |
|
410 | 415 |
if ($str && !ref($str)) { |
... | ... | |
413 | 418 |
|
414 | 419 |
$str; |
415 | 420 |
|
421 |
$main::lxdebug->leave_sub(); |
|
416 | 422 |
} |
417 | 423 |
|
418 | 424 |
sub hide_form { |
425 |
$main::lxdebug->enter_sub(); |
|
419 | 426 |
my $self = shift; |
420 | 427 |
|
421 | 428 |
if (@_) { |
... | ... | |
426 | 433 |
print($main::cgi->hidden("-name" => $_, "-default" => $self->{$_}) . "\n"); |
427 | 434 |
} |
428 | 435 |
} |
429 |
|
|
436 |
$main::lxdebug->leave_sub(); |
|
430 | 437 |
} |
431 | 438 |
|
432 | 439 |
sub error { |
... | ... | |
1312 | 1319 |
} |
1313 | 1320 |
|
1314 | 1321 |
sub get_formname_translation { |
1322 |
$main::lxdebug->enter_sub(); |
|
1315 | 1323 |
my ($self, $formname) = @_; |
1316 | 1324 |
|
1317 | 1325 |
$formname ||= $self->{formname}; |
... | ... | |
1333 | 1341 |
purchase_delivery_order => $main::locale->text('Delivery Order'), |
1334 | 1342 |
); |
1335 | 1343 |
|
1344 |
$main::lxdebug->leave_sub(); |
|
1336 | 1345 |
return $formname_translations{$formname} |
1337 | 1346 |
} |
1338 | 1347 |
|
1339 | 1348 |
sub get_number_prefix_for_type { |
1349 |
$main::lxdebug->enter_sub(); |
|
1340 | 1350 |
my ($self) = @_; |
1341 | 1351 |
|
1342 | 1352 |
my $prefix = |
... | ... | |
1345 | 1355 |
: ($self->{type} =~ /_delivery_order$/) ? 'do' |
1346 | 1356 |
: 'ord'; |
1347 | 1357 |
|
1358 |
$main::lxdebug->leave_sub(); |
|
1348 | 1359 |
return $prefix; |
1349 | 1360 |
} |
1350 | 1361 |
|
1351 | 1362 |
sub get_extension_for_format { |
1363 |
$main::lxdebug->enter_sub(); |
|
1352 | 1364 |
my ($self) = @_; |
1353 | 1365 |
|
1354 | 1366 |
my $extension = $self->{format} =~ /pdf/i ? ".pdf" |
... | ... | |
1357 | 1369 |
: $self->{format} =~ /html/i ? ".html" |
1358 | 1370 |
: ""; |
1359 | 1371 |
|
1372 |
$main::lxdebug->leave_sub(); |
|
1360 | 1373 |
return $extension; |
1361 | 1374 |
} |
1362 | 1375 |
|
1363 | 1376 |
sub generate_attachment_filename { |
1377 |
$main::lxdebug->enter_sub(); |
|
1364 | 1378 |
my ($self) = @_; |
1365 | 1379 |
|
1366 | 1380 |
my $attachment_filename = $main::locale->unquote_special_chars('HTML', $self->get_formname_translation()); |
... | ... | |
1379 | 1393 |
$attachment_filename = $main::locale->quote_special_chars('filenames', $attachment_filename); |
1380 | 1394 |
$attachment_filename =~ s|[\s/\\]+|_|g; |
1381 | 1395 |
|
1396 |
$main::lxdebug->leave_sub(); |
|
1382 | 1397 |
return $attachment_filename; |
1383 | 1398 |
} |
1384 | 1399 |
|
1385 | 1400 |
sub generate_email_subject { |
1401 |
$main::lxdebug->enter_sub(); |
|
1386 | 1402 |
my ($self) = @_; |
1387 | 1403 |
|
1388 | 1404 |
my $subject = $main::locale->unquote_special_chars('HTML', $self->get_formname_translation()); |
... | ... | |
1392 | 1408 |
$subject .= " " . $self->{"${prefix}number"} |
1393 | 1409 |
} |
1394 | 1410 |
|
1411 |
$main::lxdebug->leave_sub(); |
|
1395 | 1412 |
return $subject; |
1396 | 1413 |
} |
1397 | 1414 |
|
Auch abrufbar als: Unified diff
Debugs in SL/Form.pm eingefuegt fuer konsistentes Tracen