Revision 2e66dde5
Von Moritz Bunkus vor mehr als 11 Jahren hinzugefügt
SL/DN.pm | ||
---|---|---|
36 | 36 |
|
37 | 37 |
use SL::Common; |
38 | 38 |
use SL::DBUtils; |
39 |
use SL::DB::Default; |
|
39 | 40 |
use SL::GenericTranslations; |
40 | 41 |
use SL::IS; |
41 | 42 |
use SL::Mailer; |
... | ... | |
394 | 395 |
|
395 | 396 |
my ($self, $myconfig, $form) = @_; |
396 | 397 |
|
397 |
$form->{templates} = "$myconfig->{templates}"; |
|
398 |
my $defaults = SL::DB::Default->get; |
|
399 |
$form->error($::locale->text('No print templates have been created for this client yet. Please do so in the client configuration.')) if !$defaults->templates; |
|
400 |
$form->{templates} = $defaults->templates; |
|
398 | 401 |
$form->{language} = $form->get_template_language($myconfig); |
399 | 402 |
$form->{printer_code} = $form->get_printer_code($myconfig); |
400 | 403 |
|
... | ... | |
433 | 436 |
|
434 | 437 |
$form->{IN} = undef; |
435 | 438 |
for my $filename (@template_files) { |
436 |
if (-f "$form->{templates}/$filename") {
|
|
439 |
if (-f ($defaults->templates . "/$filename")) {
|
|
437 | 440 |
$form->{IN} = $filename; |
438 | 441 |
last; |
439 | 442 |
} |
Auch abrufbar als: Unified diff
'templates' nicht aus %::myconfig, sondern aus Defaults-Tabelle holen