X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=SL%2FUser.pm;h=640299d8ab456e405b30983fd8971f513600e011;hb=cc5d61a92113701ad19ef3c366da307307a764b0;hp=d6b870552c37f6aedcde7650a7177183f8ca2804;hpb=470a8fa1710b22e2b381eef4cacb01bebaeff725;p=kivitendo-erp.git diff --git a/SL/User.pm b/SL/User.pm index d6b870552..640299d8a 100644 --- a/SL/User.pm +++ b/SL/User.pm @@ -120,6 +120,12 @@ sub login { $self->create_schema_info_table($form, $dbh); + my $dbupdater_auth = SL::DBUpgrade2->new(form => $form, dbdriver => 'Pg', auth => 1)->parse_dbupdate_controls; + if ($dbupdater_auth->unapplied_upgrade_scripts($::auth->dbconnect)) { + $::lxdebug->leave_sub; + return -3; + } + $rc = 0; my $dbupdater = SL::DBUpgrade2->new(form => $form, dbdriver => $myconfig{dbdriver})->parse_dbupdate_controls; @@ -144,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}), @@ -171,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 }); @@ -398,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; @@ -740,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