X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FUser.pm;h=13bde36ec128cfeca0d0063744b7cfe0f5b7f8af;hb=75e721508b508648ffe2454f10cfe29ba8a359dd;hp=d2e914f7af0afd5e6534c44ed88a64e246fab977;hpb=0b280f98054da74f79cbc9fdb3e9f4c23326be53;p=kivitendo-erp.git diff --git a/SL/User.pm b/SL/User.pm index d2e914f7a..13bde36ec 100644 --- a/SL/User.pm +++ b/SL/User.pm @@ -193,13 +193,13 @@ sub login { $form->{"stylesheet"} = "lx-office-erp.css"; $form->{"title"} = $main::locale->text("Dataset upgrade"); $form->header(); - print($form->parse_html_template("dbupgrade/header")); + print($form->parse_html_template2("dbupgrade/header")); $form->{dbupdate} = "db$myconfig{dbname}"; $form->{ $form->{dbupdate} } = 1; if ($form->{"show_dbupdate_warning"}) { - print($form->parse_html_template("dbupgrade/warning")); + print($form->parse_html_template2("dbupgrade/warning")); exit(0); } @@ -224,10 +224,11 @@ sub login { my $menufile = $self->{"menustyle"} eq "v3" ? "menuv3.pl" : $self->{"menustyle"} eq "neu" ? "menunew.pl" : + $self->{"menustyle"} eq "xml" ? "menuXML.pl" : "menu.pl"; - print($form->parse_html_template("dbupgrade/footer", - { "menufile" => $menufile })); + print($form->parse_html_template2("dbupgrade/footer", + { "menufile" => $menufile })); $rc = -2; @@ -492,9 +493,9 @@ sub process_perl_script { } if (!defined($result)) { - print($form->parse_html_template("dbupgrade/error", - { "file" => $filename, - "error" => $@ })); + print($form->parse_html_template2("dbupgrade/error", + { "file" => $filename, + "error" => $@ })); exit(0); } elsif (1 != $result) { unlink("users/nologin") if (2 == $result); @@ -830,7 +831,7 @@ sub dbupdate { foreach my $upgradescript (@upgradescripts) { my $a = $upgradescript; - $a =~ s/^$form->{dbdriver}-upgrade-|\.(sql|pl)$//g; + $a =~ s/^\Q$form->{dbdriver}\E-upgrade-|\.(sql|pl)$//g; my $file_type = $1; my ($mindb, $maxdb) = split /-/, $a; @@ -927,8 +928,8 @@ sub dbupdate2 { # apply upgrade $main::lxdebug->message(DEBUG2, "Applying Update $control->{file}"); - print($form->parse_html_template("dbupgrade/upgrade_message2", - $control)); + print($form->parse_html_template2("dbupgrade/upgrade_message2", + $control)); if ($file_type eq "sql") { $self->process_query($form, $dbh, "sql/" . $form->{"dbdriver"} . @@ -966,9 +967,10 @@ sub update2_available { $query = qq|SELECT tag FROM schema_info|; $sth = $dbh->prepare($query); - $sth->execute() || $form->dberror($query); - while (($tag) = $sth->fetchrow_array()) { - $controls->{$tag}->{"applied"} = 1 if (defined($controls->{$tag})); + if ($sth->execute()) { + while (($tag) = $sth->fetchrow_array()) { + $controls->{$tag}->{"applied"} = 1 if (defined($controls->{$tag})); + } } $sth->finish(); $dbh->disconnect(); @@ -1035,7 +1037,7 @@ sub save_member { truncate(CONF, 0); while ($line = shift @config) { - if ($line =~ /^\[$self->{login}\]/) { + if ($line =~ /^\[\Q$self->{login}\E\]/) { $newmember = 0; last; } @@ -1105,7 +1107,7 @@ sub config_vars { printer role 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); + default_printer_id copies show_form_details favorites); $main::lxdebug->leave_sub();