X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FUser.pm;h=62bc94f6d6b71290d82a9dbfaa6248359580937b;hb=5e49b259ece6c5e4aa80e9c775a894972a139547;hp=d756a2ac802105510cf42cba5974e6b2e3010fb4;hpb=3d6e7124dcbe401fe578d777f952f74055a68fd4;p=kivitendo-erp.git diff --git a/SL/User.pm b/SL/User.pm index d756a2ac8..62bc94f6d 100644 --- a/SL/User.pm +++ b/SL/User.pm @@ -388,6 +388,9 @@ sub dbcreate { $filename = qq|sql/$form->{chart}-chart.sql|; $self->process_query($form, $dbh, $filename); + $query = "UPDATE defaults SET coa = " . $dbh->quote($form->{"chart"}); + $dbh->do($query) || $form->dberror($query); + $dbh->disconnect; $main::lxdebug->leave_sub(); @@ -409,6 +412,15 @@ sub process_perl_script { $dbh->begin_work(); + my %dbup_myconfig = (); + map({ $dbup_myconfig{$_} = $form->{$_}; } + qw(dbname dbuser dbpasswd dbhost dbport dbconnect)); + + my $nls_file = $filename; + $nls_file =~ s|.*/||; + $nls_file =~ s|.pl$||; + my $dbup_locale = Locale->new($main::language, $nls_file); + my $result = eval($contents); if (1 != $result) {