X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FForm.pm;h=28e12258a2564558bd1f69c3285859eb51583e95;hb=b354d72972e377a3007f8f03ad9b719488c4b3bf;hp=ae51efd78b6b3dcc324c79779b1254b86c461802;hpb=4cb3ecfd6f144901ed89dae7acafdf1c124c53f4;p=kivitendo-erp.git diff --git a/SL/Form.pm b/SL/Form.pm index ae51efd78..28e12258a 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -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,6 +1204,7 @@ sub parse_template { local (*IN, *OUT); my $userspath = $::lx_office_conf{paths}->{userspath}; + $self->{"cwd"} = getcwd(); $self->{"tmpdir"} = $self->{cwd} . "/${userspath}"; @@ -1294,7 +1296,6 @@ 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()); @@ -2380,7 +2381,7 @@ $main::lxdebug->enter_sub(); $key = "all_payments" unless ($key); - my $query = qq|SELECT * FROM payment_terms ORDER BY id|; + my $query = qq|SELECT * FROM payment_terms ORDER BY sortkey|; $self->{$key} = selectall_hashref_query($self, $dbh, $query);