]> wagnertech.de Git - mfinanz.git/blobdiff - SL/Form.pm
Merge branch 'master' of git@lx-office.linet-services.de:lx-office-erp
[mfinanz.git] / SL / Form.pm
index b63421750cdb9bf055616e1eccb618d8c591c8ea..8a4ecbf8d94e43c5c38f23d09eece4ffe92bcf89 100644 (file)
@@ -62,6 +62,7 @@ use SL::Menu;
 use SL::OE;
 use SL::Template;
 use SL::User;
+use SL::X;
 use Template;
 use URI;
 use List::Util qw(first max min sum);
@@ -458,7 +459,7 @@ sub hide_form {
 
 sub throw_on_error {
   my ($self, $code) = @_;
-  local $self->{__ERROR_HANDLER} = sub { die({ error => $_[0] }) };
+  local $self->{__ERROR_HANDLER} = sub { die SL::X::FormError->new($_[0]) };
   $code->();
 }
 
@@ -1203,7 +1204,6 @@ sub parse_template {
   local (*IN, *OUT);
 
   my $userspath = $::lx_office_conf{paths}->{userspath};
-
   $self->{"cwd"} = getcwd();
   $self->{"tmpdir"} = $self->{cwd} . "/${userspath}";
 
@@ -1295,6 +1295,7 @@ sub parse_template {
     $result = $template->parse(*STDOUT);
   }
 
+  Common::copy_file_to_webdav_folder($self)  if ($self->{webdav});
   if (!$result) {
     $self->cleanup();
     $self->error("$self->{IN} : " . $template->get_error());