X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FForm.pm;h=9e55af355132638d98ffbb2452ed814a6b49b02f;hb=a4a6a0d34b965bec11b5a8de554a21fa7370a9d6;hp=a0fa96a2ce6283852b21cd913aa8da349369a22c;hpb=a5f30bf0b12c7e02f545f06215b4b10f01fa12d0;p=kivitendo-erp.git
diff --git a/SL/Form.pm b/SL/Form.pm
index a0fa96a2c..9e55af355 100644
--- a/SL/Form.pm
+++ b/SL/Form.pm
@@ -37,8 +37,11 @@
package Form;
+use HTML::Template;
+use SL::Menu;
+
sub _input_to_hash {
- $main::lxdebug->enter_sub();
+ $main::lxdebug->enter_sub(2);
my $input = $_[0];
my %in = ();
@@ -49,13 +52,13 @@ sub _input_to_hash {
$in{$name} = unescape(undef, $value);
}
- $main::lxdebug->leave_sub();
+ $main::lxdebug->leave_sub(2);
return %in;
}
sub _request_to_hash {
- $main::lxdebug->enter_sub();
+ $main::lxdebug->enter_sub(2);
my ($input) = @_;
my ($i, $loc, $key, $val);
@@ -106,11 +109,11 @@ sub _request_to_hash {
}
}
- $main::lxdebug->leave_sub();
+ $main::lxdebug->leave_sub(2);
return %ATTACH;
} else {
- $main::lxdebug->leave_sub();
+ $main::lxdebug->leave_sub(2);
return _input_to_hash($input);
}
}
@@ -140,8 +143,7 @@ sub new {
$self->{action} = lc $self->{action};
$self->{action} =~ s/( |-|,|#)/_/g;
- $self->{version} = "2.1.2";
- $self->{dbversion} = "2.1.2";
+ $self->{version} = "2.3.0";
$main::lxdebug->leave_sub();
@@ -161,7 +163,7 @@ sub debug {
}
sub escape {
- $main::lxdebug->enter_sub();
+ $main::lxdebug->enter_sub(2);
my ($self, $str, $beenthere) = @_;
@@ -172,13 +174,13 @@ sub escape {
$str =~ s/([^a-zA-Z0-9_.-])/sprintf("%%%02x", ord($1))/ge;
- $main::lxdebug->leave_sub();
+ $main::lxdebug->leave_sub(2);
return $str;
}
sub unescape {
- $main::lxdebug->enter_sub();
+ $main::lxdebug->enter_sub(2);
my ($self, $str) = @_;
@@ -187,7 +189,7 @@ sub unescape {
$str =~ s/%([0-9a-fA-Z]{2})/pack("c",hex($1))/eg;
- $main::lxdebug->leave_sub();
+ $main::lxdebug->leave_sub(2);
return $str;
}
@@ -195,37 +197,43 @@ sub unescape {
sub quote {
my ($self, $str) = @_;
- if ($str && ! ref($str)) {
- $str =~ s/"/"/g;
+ if ($str && !ref($str)) {
+ $str =~ s/\"/"/g;
}
$str;
}
-
sub unquote {
my ($self, $str) = @_;
- if ($str && ! ref($str)) {
- $str =~ s/"/"/g;
+ if ($str && !ref($str)) {
+ $str =~ s/"/\"/g;
}
$str;
}
-
sub hide_form {
my $self = shift;
if (@_) {
- for (@_) { print qq|\n| }
+ for (@_) {
+ print qq|\n|;
+ }
} else {
delete $self->{header};
- for (sort keys %$self) { print qq|\n| }
+ for (sort keys %$self) {
+ print qq|\n|;
+ }
}
-
+
}
sub error {
@@ -235,21 +243,7 @@ sub error {
if ($ENV{HTTP_USER_AGENT}) {
$msg =~ s/\n/
/g;
-
- $self->header;
-
- print qq|
-
$msg - - -