Bei Kunden die Validität nicht speichern.
authorSven Schöling <s.schoeling@linet-services.de>
Mon, 5 Oct 2009 15:02:20 +0000 (17:02 +0200)
committerSven Schöling <s.schoeling@linet-services.de>
Mon, 5 Oct 2009 15:02:46 +0000 (17:02 +0200)
Fix für Bug 1191

SL/CT.pm
SL/CVar.pm

index 2397fe7..80916ad 100644 (file)
--- a/SL/CT.pm
+++ b/SL/CT.pm
@@ -446,7 +446,8 @@ sub save_customer {
   CVar->save_custom_variables('dbh'       => $dbh,
                               'module'    => 'CT',
                               'trans_id'  => $form->{id},
-                              'variables' => $form);
+                              'variables' => $form,
+                              'always_valid' => 1);
 
   $rc = $dbh->commit();
   $dbh->disconnect();
@@ -651,7 +652,8 @@ sub save_vendor {
   CVar->save_custom_variables('dbh'       => $dbh,
                               'module'    => 'CT',
                               'trans_id'  => $form->{id},
-                              'variables' => $form);
+                              'variables' => $form,
+                              'always_valid' => 1);
 
   $rc = $dbh->commit();
   $dbh->disconnect();
index d50f2fa..a55cdf4 100644 (file)
@@ -334,9 +334,11 @@ sub save_custom_variables {
 
     do_statement($form, $sth, $query, @values);
 
-    $self->save_custom_variables_validity(trans_id => $params{trans_id}, config_id => $config->{id},
-      validity => ($params{variables}->{"$params{name_prefix}cvar_$config->{name}$params{name_postfix}_valid"} ? 1 : 0)
-    );
+    unless ($params{always_valid}) {
+      $self->save_custom_variables_validity(trans_id => $params{trans_id}, config_id => $config->{id},
+        validity => ($params{variables}->{"$params{name_prefix}cvar_$config->{name}$params{name_postfix}_valid"} ? 1 : 0)
+      );
+    };
   }
 
   $sth->finish();