Speichern der Historie nach Speichern des Belegs selber.
authorMoritz Bunkus <m.bunkus@linet-services.de>
Wed, 21 Feb 2007 08:28:25 +0000 (08:28 +0000)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Wed, 21 Feb 2007 08:28:25 +0000 (08:28 +0000)
bin/mozilla/oe.pl

index 3b9e3b3..99ff0cd 100644 (file)
@@ -1937,17 +1937,18 @@ sub save_and_close {
   }
 
   relink_accounts();
+
+  $form->error($err) if (!OE->save(\%myconfig, \%$form));
+
   # saving the history
   if(!exists $form->{addition}) {
        $form->{addition} = "SAVED";
        $form->save_history($form->dbconnect(\%myconfig));
   }
-  # /saving the history 
+  # /saving the history
 
-  $form->redirect(
-            $form->{label} . " $form->{$ordnumber} " . $locale->text('saved!'))
-    if (OE->save(\%myconfig, \%$form));
-  $form->error($err);
+  $form->redirect($form->{label} . " $form->{$ordnumber} " .
+                  $locale->text('saved!'));
 
   $lxdebug->leave_sub();
 }
@@ -2017,6 +2018,9 @@ sub save {
     unless $form->{$ordnumber};
 
   relink_accounts();
+
+  OE->save(\%myconfig, \%$form);
+
   # saving the history
   if(!exists $form->{addition}) {
        $form->{addition} = "SAVED";
@@ -2024,7 +2028,6 @@ sub save {
   }
   # /saving the history 
 
-  OE->save(\%myconfig, \%$form);
   $form->{simple_save} = 1;
   if(!$form->{print_and_save}) {
     set_headings("edit");