X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FTemplate.pm;h=b20a7b1a3b5a25c55713b0daa10a53f972162e11;hb=94f5cb152afa9210162295b6727801c296af0631;hp=df6dbec7cdfe2000c1813d820abbd96ea971d527;hpb=9ead220cfa6c48e0242efc920429e7b393f055f2;p=kivitendo-erp.git diff --git a/SL/Template.pm b/SL/Template.pm index df6dbec7c..b20a7b1a3 100644 --- a/SL/Template.pm +++ b/SL/Template.pm @@ -19,13 +19,18 @@ use SL::Template::LaTeX; use SL::Template::OpenDocument; use SL::Template::PlainText; use SL::Template::ShellCommand; -use SL::Template::XML; sub create { my %params = @_; my $package = "SL::Template::" . $params{type}; - $package->new($params{file_name}, $params{form}, $params{myconfig} || \%::myconfig, $params{userspath} || $::lx_office_conf{paths}->{userspath}); + $package->new( + %params, + source => $params{file_name}, + form => $params{form}, + myconfig => $params{myconfig} || \%::myconfig, + userspath => $params{userspath} || $::lx_office_conf{paths}->{userspath}, + ); } sub available_templates { @@ -41,12 +46,12 @@ sub available_templates { my @alldir = sort grep { -d ($::lx_office_conf{paths}->{templates} . "/$_") && !/^\.\.?$/ - && !m/\.(?:html|tex|sty|odt|xml|txb)$/ - && !m/^(?:webpages$|print$|mail$|\.)/ + && !m/\.(?:html|tex|sty|odt)$/ + && !m/^(?:webpages$|mobile_webpages$|pdf$|print$|mail$|\.)/ } keys %dir_h; tie %dir_h, 'IO::Dir', "$::lx_office_conf{paths}->{templates}/print"; - my @allmaster = ('Standard', sort grep { -d ("$::lx_office_conf{paths}->{templates}/print" . "/$_") && !/^\.\.?$/ && !/^Standard$/ } keys %dir_h); + my @allmaster = (sort grep { -d ("$::lx_office_conf{paths}->{templates}/print" . "/$_") && !/^\.\.?$/ && !/^Standard$/ } keys %dir_h); return ( print_templates => \@alldir,