diff options
| author | hukl <contact@smyck.org> | 2009-02-21 17:36:09 +0100 |
|---|---|---|
| committer | hukl <contact@smyck.org> | 2009-02-21 17:36:09 +0100 |
| commit | 41448123069858d754931d136d90ea2665d8a8be (patch) | |
| tree | 7eddf0f51aa4120bc2b5757bc712f9489523e3f1 /lib/update_importer.rb | |
| parent | 55800bf0565f392a48b6d3a673da60525aad423b (diff) | |
added importer for authors and adding proper authors
to imported pages
Diffstat (limited to 'lib/update_importer.rb')
| -rw-r--r-- | lib/update_importer.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/update_importer.rb b/lib/update_importer.rb index 1fcf40e..49614b4 100644 --- a/lib/update_importer.rb +++ b/lib/update_importer.rb | |||
| @@ -99,6 +99,11 @@ class UpdateImporter | |||
| 99 | 99 | ||
| 100 | end | 100 | end |
| 101 | 101 | ||
| 102 | if xhtml.elements['author'] | ||
| 103 | user = User.find_by_login(xhtml.elements['author'].get_text.to_s) | ||
| 104 | page.user = user | ||
| 105 | end | ||
| 106 | |||
| 102 | page.published_at = date.to_time | 107 | page.published_at = date.to_time |
| 103 | page.save! | 108 | page.save! |
| 104 | 109 | ||
