From: Sven Schöling Date: Thu, 20 Jun 2013 16:41:57 +0000 (+0200) Subject: Klassenvariable vermeiden (einfacher zu testen) X-Git-Tag: release-3.1.0beta1~296 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=4491f15f35427996ab4de135bd3390103a293e73;p=kivitendo-erp.git Klassenvariable vermeiden (einfacher zu testen) --- diff --git a/SL/Drafts.pm b/SL/Drafts.pm index 16111af9c..bf19e52d3 100644 --- a/SL/Drafts.pm +++ b/SL/Drafts.pm @@ -38,6 +38,10 @@ sub get_module { my @dont_save = qw(login password action); +sub dont_save { + return @dont_save; +} + sub save { $main::lxdebug->enter_sub(); diff --git a/bin/mozilla/drafts.pl b/bin/mozilla/drafts.pl index cac7bea36..83cf6be90 100644 --- a/bin/mozilla/drafts.pl +++ b/bin/mozilla/drafts.pl @@ -120,7 +120,7 @@ sub load_draft { if ($old_form) { $old_form = YAML::Load($old_form); - my %dont_save_vars = map { $_ => 1 } @Drafts::dont_save; + my %dont_save_vars = map { $_ => 1 } Drafts->dont_save; my @restore_vars = grep { !$dont_save_vars{$_} } keys %{ $old_form }; @{$form}{@restore_vars} = @{$old_form}{@restore_vars};