projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Leeren String in undef für anständige DB-Abfrage umwandeln
[kivitendo-erp.git]
/
SL
/
Form.pm
diff --git
a/SL/Form.pm
b/SL/Form.pm
index
31020ae
..
28e1225
100644
(file)
--- 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::OE;
use SL::Template;
use SL::User;
+use SL::X;
use Template;
use URI;
use List::Util qw(first max min sum);
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) = @_;
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->();
}
$code->();
}
@@
-996,17
+997,13
@@
sub redirect {
my ($self, $msg) = @_;
if (!$self->{callback}) {
my ($self, $msg) = @_;
if (!$self->{callback}) {
-
$self->info($msg);
$self->info($msg);
- ::end_of_request();
- }
-# my ($script, $argv) = split(/\?/, $self->{callback}, 2);
-# $script =~ s|.*/||;
-# $script =~ s|[^a-zA-Z0-9_\.]||g;
-# exec("perl", "$script", $argv);
+ } else {
+ print $::form->redirect_header($self->{callback});
+ }
-
print $::form->redirect_header($self->{callback}
);
+
::end_of_request(
);
$main::lxdebug->leave_sub();
}
$main::lxdebug->leave_sub();
}
@@
-2384,7
+2381,7
@@
$main::lxdebug->enter_sub();
$key = "all_payments" unless ($key);
$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);
$self->{$key} = selectall_hashref_query($self, $dbh, $query);