Revision 738fb45b
Von Moritz Bunkus vor fast 12 Jahren hinzugefügt
SL/DB.pm | ||
---|---|---|
my %connect_settings;
|
||
my $initial_sql;
|
||
|
||
if (!%::myconfig) {
|
||
$type = 'KIVITENDO_EMPTY';
|
||
%connect_settings = ( driver => 'Pg' );
|
||
|
||
} elsif ($type eq 'KIVITENDO_AUTH') {
|
||
%connect_settings = ( driver => $::myconfig{dbdriver} || 'Pg',
|
||
if ($type eq 'KIVITENDO_AUTH') {
|
||
%connect_settings = ( driver => 'Pg',
|
||
database => $::auth->{DB_config}->{db},
|
||
host => $::auth->{DB_config}->{host} || 'localhost',
|
||
port => $::auth->{DB_config}->{port} || 5432,
|
||
... | ... | |
password => $::auth->{DB_config}->{password},
|
||
connect_options => { pg_enable_utf8 => $::locale && $::locale->is_utf8,
|
||
});
|
||
} elsif (!%::myconfig) {
|
||
$type = 'KIVITENDO_EMPTY';
|
||
%connect_settings = ( driver => 'Pg' );
|
||
|
||
} else {
|
||
my $european_dates = 0;
|
||
if ($::myconfig{dateformat}) {
|
Auch abrufbar als: Unified diff
Rose::DB: DB-Verbindung: Zuerst auf Type "AUTH" prüfen, dann leer nehmen, falls keine %::myconfig
Andernfalls kann man aus admin.pl, wo %::myconfig oft genug leer ist,
keine Rose::DB-Objekte Auth* nutzen.