X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FUser.pm;h=5d58b5daca1bcbc2f88d0e537cb239a2b4f4829d;hb=0b542b2592c077957d9ccc08ca0cf84886e2b1d2;hp=d638220c2e41853e5397f81b2c65463780fbc90f;hpb=be3db7d1e68a317041a9556f2849c292334245ab;p=kivitendo-erp.git diff --git a/SL/User.pm b/SL/User.pm index d638220c2..5d58b5dac 100644 --- a/SL/User.pm +++ b/SL/User.pm @@ -77,9 +77,9 @@ sub country_codes { my @dir = grep(!/(^\.\.?$|\..*)/, readdir(DIR)); foreach my $dir (@dir) { - next unless open(FH, "locale/$dir/LANGUAGE"); - @language = ; - close FH; + next unless open(my $fh, '<:encoding(UTF-8)', "locale/$dir/LANGUAGE"); + @language = <$fh>; + close $fh; $cc{$dir} = "@language"; } @@ -150,7 +150,7 @@ sub login { } # update the tables - if (!open(FH, ">" . $::lx_office_conf{paths}->{userspath} . "/nologin")) { + if (!open(FH, ">", $::lx_office_conf{paths}->{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.', $::lx_office_conf{paths}->{userspath}), @@ -177,7 +177,6 @@ sub login { $self->{"menustyle"} eq "v3" ? "menuv3.pl" : $self->{"menustyle"} eq "neu" ? "menunew.pl" : $self->{"menustyle"} eq "js" ? "menujs.pl" : - $self->{"menustyle"} eq "xml" ? "menuXML.pl" : "menu.pl"; print $form->parse_html_template("dbupgrade/footer", { "menufile" => $menufile }); @@ -404,6 +403,12 @@ sub dbcreate { $query = "UPDATE defaults SET coa = ?"; do_query($form, $dbh, $query, $form->{chart}); + $query = "UPDATE defaults SET accounting_method = ?"; + do_query($form, $dbh, $query, $form->{accounting_method}); + $query = "UPDATE defaults SET profit_determination = ?"; + do_query($form, $dbh, $query, $form->{profit_determination}); + $query = "UPDATE defaults SET inventory_system = ?"; + do_query($form, $dbh, $query, $form->{inventory_system}); $dbh->disconnect; @@ -733,7 +738,7 @@ sub create_employee_entry { do_query($form, $dbh, $query, ($self->{login}, $myconfig->{name}, $myconfig->{tel}, "user")); } elsif ($update_existing) { - my $query = qq|UPDATE employee SET name = ?, workphone = ?, role = 'user' WHERE id = ?|; + my $query = qq|UPDATE employee SET name = ?, workphone = ?, role = 'user', deleted = 'f' WHERE id = ?|; do_query($form, $dbh, $query, $myconfig->{name}, $myconfig->{tel}, $id); } @@ -746,7 +751,7 @@ sub config_vars { 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 + printer sid signature stylesheet tel templates vclimit angebote bestellungen rechnungen anfragen lieferantenbestellungen einkaufsrechnungen taxnumber co_ustid duns menustyle template_format default_media default_printer_id copies show_form_details favorites