X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/0b280f98054da74f79cbc9fdb3e9f4c23326be53..b63e6fde1fc3f9da21ab6ed1ed250bde0810aa5f:/SL/User.pm diff --git a/SL/User.pm b/SL/User.pm index d2e914f7a..1984ca5ae 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_template("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_template("dbupgrade/warning"); exit(0); } @@ -224,10 +224,10 @@ 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_template("dbupgrade/footer", { "menufile" => $menufile }); $rc = -2; @@ -492,9 +492,9 @@ sub process_perl_script { } if (!defined($result)) { - print($form->parse_html_template("dbupgrade/error", - { "file" => $filename, - "error" => $@ })); + print $form->parse_html_template("dbupgrade/error", + { "file" => $filename, + "error" => $@ }); exit(0); } elsif (1 != $result) { unlink("users/nologin") if (2 == $result); @@ -830,7 +830,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 +927,7 @@ 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_template("dbupgrade/upgrade_message2", $control); if ($file_type eq "sql") { $self->process_query($form, $dbh, "sql/" . $form->{"dbdriver"} . @@ -966,9 +965,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 +1035,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 +1105,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();