X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/6d1df9ca24bbb8c03e10812ce4cf1b889d947470..b6dc5623d93c1be1c54248d4512e80f495af2899:/SL/Common.pm diff --git a/SL/Common.pm b/SL/Common.pm index 2aedb6f81..9d7cdcbcc 100644 --- a/SL/Common.pm +++ b/SL/Common.pm @@ -435,4 +435,26 @@ sub save_email_status { $main::lxdebug->leave_sub(); } +sub check_params { + my $params = shift; + + foreach my $key (@_) { + if (!defined $params->{$key}) { + my $subroutine = (caller(1))[3]; + $main::form->error($main::locale->text("Missing parameter #1 in call to sub #2.", $key, $subroutine)); + } + } +} + +sub check_params_x { + my $params = shift; + + foreach my $key (@_) { + if (!exists $params->{$key}) { + my $subroutine = (caller(1))[3]; + $main::form->error($main::locale->text("Missing parameter #1 in call to sub #2.", $key, $subroutine)); + } + } +} + 1;