Deutliche Beschleunigung der USTVA-Berechnung durch Einschränkung der betrachteten...
[kivitendo-erp.git] / SL / User.pm
index d2e914f..8e60b8d 100644 (file)
@@ -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;
@@ -966,9 +966,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 +1036,7 @@ sub save_member {
   truncate(CONF, 0);
 
   while ($line = shift @config) {
-    if ($line =~ /^\[$self->{login}\]/) {
+    if ($line =~ /^\[\Q$self->{login}\E\]/) {
       $newmember = 0;
       last;
     }