do_statement($form, $sth, $query, @values);
- my $valid_index = "$params{name_prefix}cvar_$config->{name}$params{name_postfix}_valid";
- $self->save_custom_variables_validity(trans_id => $params{trans_id}, config_id => $config->{id},
- validity => ($params{variables}{$valid_index} || $params{always_valid} ? 1 : 0)
- );
+ if ($params{save_validity}) {
+ my $valid_index = "$params{name_prefix}cvar_$config->{name}$params{name_postfix}_valid";
+ $self->save_custom_variables_validity(trans_id => $params{trans_id},
+ config_id => $config->{id},
+ validity => ($params{variables}{$valid_index} || $params{always_valid} ? 1 : 0)
+ );
+ }
}
$sth->finish();
}
}
- CVar->save_custom_variables('dbh' => $dbh,
- 'module' => 'IC',
- 'trans_id' => $form->{id},
- 'variables' => $form);
+ CVar->save_custom_variables(dbh => $dbh,
+ module => 'IC',
+ trans_id => $form->{id},
+ variables => $form,
+ save_validity => 1);
# commit
my $rc = $dbh->commit;
--- /dev/null
+-- @tag: invalid_entries_in_custom_variables_validity
+-- @description: Ungültige Einträge in custom_variables_validity bereinigen
+-- @depends: release_2_6_1
+-- @charset: utf-8
+DELETE FROM custom_variables_validity
+WHERE trans_id NOT IN (
+ SELECT id
+ FROM parts
+);