From 955524ef5e5165a71c67b66abaad2c9e2797efd6 Mon Sep 17 00:00:00 2001 From: hukl Date: Sun, 22 Feb 2009 16:03:09 +0100 Subject: cloning tags from heads to new drafts. splitted the find_or_create_draft method to make it easier to read. fixed a bug in the importer which caused tag loss --- lib/update_importer.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/update_importer.rb b/lib/update_importer.rb index 49614b4..0cc07fe 100644 --- a/lib/update_importer.rb +++ b/lib/update_importer.rb @@ -114,9 +114,10 @@ class UpdateImporter if (flags = xhtml.elements['flags']) && page page.tag_list.add("event") if flags.attributes['calendar'] page.tag_list.add("pressemitteilung") if flags.attributes['pm'] - page.save! end + page.save! + if node.head.nil? && page node.head = page node.save! -- cgit v1.3