Revision 2e66dde5
Von Moritz Bunkus vor mehr als 11 Jahren hinzugefügt
bin/mozilla/io.pl | ||
---|---|---|
47 | 47 |
use SL::IC; |
48 | 48 |
use SL::IO; |
49 | 49 |
|
50 |
use SL::DB::Default; |
|
50 | 51 |
use SL::DB::Language; |
51 | 52 |
use SL::DB::Printer; |
52 | 53 |
use SL::Helper::Flash; |
... | ... | |
1224 | 1225 |
|
1225 | 1226 |
_check_io_auth(); |
1226 | 1227 |
|
1228 |
my $defaults = SL::DB::Default->get; |
|
1229 |
$form->error($::locale->text('No print templates have been created for this client yet. Please do so in the client configuration.')) if !$defaults->templates; |
|
1230 |
$form->{templates} = $defaults->templates; |
|
1231 |
|
|
1227 | 1232 |
my ($old_form) = @_; |
1228 | 1233 |
|
1229 | 1234 |
my $inv = "inv"; |
... | ... | |
1447 | 1452 |
|
1448 | 1453 |
$form->{notes} =~ s/^\s+//g; |
1449 | 1454 |
|
1450 |
$form->{templates} = "$myconfig{templates}"; |
|
1451 |
|
|
1452 | 1455 |
delete $form->{printer_command}; |
1453 | 1456 |
|
1454 | 1457 |
$form->{language} = $form->get_template_language(\%myconfig); |
... | ... | |
1528 | 1531 |
push @template_files, "$form->{formname}.$extension"; |
1529 | 1532 |
push @template_files, "default.$extension"; |
1530 | 1533 |
@template_files = uniq @template_files; |
1531 |
$form->{IN} = first { -f "$myconfig{templates}/$_" } @template_files;
|
|
1534 |
$form->{IN} = first { -f ($defaults->templates . "/$_") } @template_files;
|
|
1532 | 1535 |
|
1533 | 1536 |
if (!defined $form->{IN}) { |
1534 | 1537 |
$::form->error($::locale->text('Cannot find matching template for this print request. Please contact your template maintainer. I tried these: #1.', join ', ', map { "'$_'"} @template_files)); |
Auch abrufbar als: Unified diff
'templates' nicht aus %::myconfig, sondern aus Defaults-Tabelle holen