Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 22c02125

Von Moritz Bunkus vor mehr als 13 Jahren hinzugefügt

  • ID 22c021254b5dcf3367d95d48cea3e1f7412ef369
  • Vorgänger ae9df702
  • Nachfolger 40cd9c84

Alle Datenbankverbindungen über DBIx::Log4perl laufen lassen, sofern dies in der Konfiguration aktiviert ist

Unterschiede anzeigen:

SL/Auth.pm
13 13
use SL::Auth::LDAP;
14 14

  
15 15
use SL::User;
16
use SL::DBConnect;
16 17
use SL::DBUpgrade2;
17 18
use SL::DBUtils;
18 19

  
......
38 39
sub get_user_dbh {
39 40
  my ($self, $login) = @_;
40 41
  my %user = $self->read_user($login);
41
  my $dbh  = DBI->connect(
42
  my $dbh  = SL::DBConnect->connect(
42 43
    $user{dbconnect},
43 44
    $user{dbuser},
44 45
    $user{dbpasswd},
......
166 167

  
167 168
  $main::lxdebug->message(LXDebug->DEBUG1, "Auth::dbconnect DSN: $dsn");
168 169

  
169
  $self->{dbh} = DBI->connect($dsn, $cfg->{user}, $cfg->{password}, { pg_enable_utf8 => $::locale->is_utf8, AutoCommit => 1 });
170
  $self->{dbh} = SL::DBConnect->connect($dsn, $cfg->{user}, $cfg->{password}, { pg_enable_utf8 => $::locale->is_utf8, AutoCommit => 1 });
170 171

  
171 172
  if (!$may_fail && !$self->{dbh}) {
172 173
    $main::form->error($main::locale->text('The connection to the authentication database failed:') . "\n" . $DBI::errstr);
......
246 247
  my $encoding   = $Common::charset_to_db_encoding{$charset};
247 248
  $encoding    ||= 'UNICODE';
248 249

  
249
  my $dbh        = DBI->connect($dsn, $params{superuser}, $params{superuser_password}, { pg_enable_utf8 => $charset =~ m/^utf-?8$/i });
250
  my $dbh        = SL::DBConnect->connect($dsn, $params{superuser}, $params{superuser_password}, { pg_enable_utf8 => $charset =~ m/^utf-?8$/i });
250 251

  
251 252
  if (!$dbh) {
252 253
    $main::form->error($main::locale->text('The connection to the template database failed:') . "\n" . $DBI::errstr);

Auch abrufbar als: Unified diff