From b9f6d2f5eb8fed1feae2554af76a4f1bebce3e87 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Wed, 30 May 2007 15:12:06 +0000 Subject: [PATCH] =?utf8?q?Beim=20Laden=20von=20Entw=C3=BCrfen=20nicht=20re?= =?utf8?q?store=5Fform()=20benutzen,=20weil=20restore=5Fform()=20erwartet,?= =?utf8?q?=20dass=20der=20=C3=BCbergebene=20String=20wie=20von=20save=5Ffo?= =?utf8?q?rm()=20escapet=20wurde=20(Zeilenumbr=C3=BCche=20und=20"!"=20werd?= =?utf8?q?en=20umcodiert).=20Das=20ist=20aber=20bei=20Entw=C3=BCrfen=20nic?= =?utf8?q?ht=20der=20Fall,=20weil=20die=20Ausgabe=20von=20YAML::Dump()=20d?= =?utf8?q?irekt=20in=20der=20Datenbank=20gespeichert=20wird.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- bin/mozilla/drafts.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/mozilla/drafts.pl b/bin/mozilla/drafts.pl index 18af531f2..b575715ce 100644 --- a/bin/mozilla/drafts.pl +++ b/bin/mozilla/drafts.pl @@ -7,6 +7,8 @@ # #====================================================================== +use YAML; + use SL::Drafts; require "bin/mozilla/common.pl"; @@ -98,7 +100,8 @@ sub load_draft { my ($old_form, $id, $description) = Drafts->load(\%myconfig, $form, $form->{id}); if ($old_form) { - restore_form($old_form, 1); + $old_form = YAML::Load($old_form); + @{$form}{keys %{ $old_form } } = @{$old_form}{keys %{ $old_form } }; $form->{draft_id} = $id; $form->{draft_description} = $description; $form->{remove_draft} = 'checked'; -- 2.20.1