From a8e3100cce96084268ed6905033c99fffd8af776 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Tue, 19 Jul 2016 19:25:18 +0200 Subject: [PATCH] =?utf8?q?Drafts:=20load=20kann=20jetzt=20zus=C3=A4tzliche?= =?utf8?q?=20Argumente=20aus=20form=20=C3=BCbernehmen?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/Controller/Draft.pm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/SL/Controller/Draft.pm b/SL/Controller/Draft.pm index 9eff3fcfb..3f03f2c67 100644 --- a/SL/Controller/Draft.pm +++ b/SL/Controller/Draft.pm @@ -82,10 +82,16 @@ sub action_load { require $allowed_modules{ $self->draft->module }; } + + my $params = delete $::form->{form}; my $new_form = YAML::Load($self->draft->form); $::form->{$_} = $new_form->{$_} for keys %$new_form; $::form->{"draft_$_"} = $self->draft->$_ for qw(id description); + if ($params && 'HASH' eq ref $params) { + $::form->{$_} = $params->{$_} for keys %$params; + } + $::form->{script} = $self->draft->module . '.pl'; ::update(); } -- 2.20.1