Kleinen Grammatikfehler behoben.
[kivitendo-erp.git] / SL / Form.pm
index b85d374..d5bb9c3 100644 (file)
@@ -306,11 +306,13 @@ sub new {
   my $db_charset   = $main::dbcharset;
   $db_charset    ||= Common::DEFAULT_CHARSET;
 
-  if ($self->{INPUT_ENCODING} && (lc $self->{INPUT_ENCODING} ne $db_charset)) {
-    require Text::Iconv;
-    my $iconv = Text::Iconv->new($self->{INPUT_ENCODING}, $db_charset);
+  if ($self->{INPUT_ENCODING}) {
+    if (lc $self->{INPUT_ENCODING} ne lc $db_charset) {
+      require Text::Iconv;
+      my $iconv = Text::Iconv->new($self->{INPUT_ENCODING}, $db_charset);
 
-    _recode_recursively($iconv, $self);
+      _recode_recursively($iconv, $self);
+    }
 
     delete $self{INPUT_ENCODING};
   }
@@ -607,9 +609,10 @@ sub create_http_response {
     my $session_cookie_value   = $main::auth->get_session_id();
     $session_cookie_value    ||= 'NO_SESSION';
 
-    $session_cookie = $cgi->cookie('-name'  => $main::auth->get_session_cookie_name(),
-                                   '-value' => $session_cookie_value,
-                                   '-path'  => $base_path);
+    $session_cookie = $cgi->cookie('-name'   => $main::auth->get_session_cookie_name(),
+                                   '-value'  => $session_cookie_value,
+                                   '-path'   => $base_path,
+                                   '-secure' => $ENV{HTTPS});
   }
 
   my %cgi_params = ('-type' => $params{content_type});
@@ -1355,9 +1358,6 @@ Content-Length: $numbytes
 
         while (<IN>) {
           print OUT $_;
-        open(DUMP_OUT, "> /tmp/lx2.dump" );
-        print(DUMP_OUT Dumper($self));
-        close(DUMP_OUT);
 
         }
 
@@ -1398,6 +1398,7 @@ sub get_formname_translation {
     storno_packing_list     => $main::locale->text('Storno Packing List'),
     sales_delivery_order    => $main::locale->text('Delivery Order'),
     purchase_delivery_order => $main::locale->text('Delivery Order'),
+    dunning                 => $main::locale->text('Dunning'),
   );
 
   $main::lxdebug->leave_sub();
@@ -2020,6 +2021,8 @@ sub get_employee {
 
   my ($self, $dbh) = @_;
 
+  $dbh ||= $self->get_standard_dbh(\%main::myconfig);
+
   my $query = qq|SELECT id, name FROM employee WHERE login = ?|;
   ($self->{"employee_id"}, $self->{"employee"}) = selectrow_query($self, $dbh, $query, $self->{login});
   $self->{"employee_id"} *= 1;