X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/d099e8002715b269a2984051edf720b0fca6bedf..ca12e8dfc4773aabc13818a0398e06e44028e2bc:/SL/User.pm diff --git a/SL/User.pm b/SL/User.pm index cfa43fee3..805335a29 100644 --- a/SL/User.pm +++ b/SL/User.pm @@ -145,7 +145,12 @@ sub login { } # update the tables - open(FH, ">$main::userspath/nologin") or die("$!"); + if (!open(FH, ">$main::userspath/nologin")) { + $form->show_generic_error($main::locale->text('A temporary file could not be created. ' . + 'Please verify that the directory "#1" is writeable by the webserver.', + $main::userspath), + 'back_button' => 1); + } # required for Oracle $form->{dbdefault} = $sid; @@ -311,6 +316,25 @@ sub dbsources { return @dbsources; } +sub dbclusterencoding { + $main::lxdebug->enter_sub(); + + my ($self, $form) = @_; + + $form->{dbdefault} ||= $form->{dbuser}; + + dbconnect_vars($form, $form->{dbdefault}); + + my $dbh = DBI->connect($form->{dbconnect}, $form->{dbuser}, $form->{dbpasswd}) || $form->dberror(); + my $query = qq|SELECT pg_encoding_to_char(encoding) FROM pg_database WHERE datname = 'template0'|; + my ($cluster_encoding) = $dbh->selectrow_array($query); + $dbh->disconnect(); + + $main::lxdebug->leave_sub(); + + return $cluster_encoding; +} + sub dbcreate { $main::lxdebug->enter_sub(); @@ -950,7 +974,7 @@ sub create_employee_entry { sub config_vars { $main::lxdebug->enter_sub(); - my @conf = qw(acs address admin businessnumber company countrycode + my @conf = qw(address admin businessnumber company countrycode currency dateformat dbconnect dbdriver dbhost dbport dboptions dbname dbuser dbpasswd email fax name numberformat password printer role sid signature stylesheet tel templates vclimit angebote