]> wagnertech.de Git - mfinanz.git/blobdiff - SL/DBConnect.pm
Admin: Teile von admin.pl in neuen Controller Admin verschoben; Mandanten anzeigen
[mfinanz.git] / SL / DBConnect.pm
index fbcf1d5a17d42b3889f83e95aec35e9446380fed..3ad5dfdf766b5b409c56997dbae0fa5f13b46faa 100644 (file)
@@ -7,12 +7,19 @@ use DBI;
 sub connect {
   shift;
 
+  # print STDERR "Starting full caller dump:\n";
+  # my $level = 0;
+  # while (my ($dummy, $filename, $line, $subroutine) = caller $level) {
+  #   print STDERR "  ${subroutine} from ${filename}:${line}\n";
+  #   $level++;
+  # }
+
   return DBI->connect(@_) unless $::lx_office_conf{debug} && $::lx_office_conf{debug}->{dbix_log4perl};
 
   require Log::Log4perl;
   require DBIx::Log4perl;
 
-  my $filename =  $LXDebug::file_name;
+  my $filename =  $::lxdebug->file;
   my $config   =  $::lx_office_conf{debug}->{dbix_log4perl_config};
   $config      =~ s/LXDEBUGFILE/${filename}/g;
 
@@ -20,4 +27,14 @@ sub connect {
   return DBIx::Log4perl->connect(@_);
 }
 
+sub get_options {
+  my $self    = shift;
+  my $options = {
+    pg_enable_utf8 => $::locale->is_utf8,
+    @_
+  };
+
+  return $options;
+}
+
 1;