From 0872cce1ea218865230f3f0f09d2fbcb6895205f Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 10 May 2009 01:11:16 +0000 Subject: Fix a bug where when we copied over the g2 thumb or resize, we weren't saving its dimensions to the item. Also, import originationTimestamp as captured field. --- modules/g2_import/helpers/g2_import.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/g2_import/helpers/g2_import.php b/modules/g2_import/helpers/g2_import.php index a4177479..93131929 100644 --- a/modules/g2_import/helpers/g2_import.php +++ b/modules/g2_import/helpers/g2_import.php @@ -204,6 +204,7 @@ class g2_import_Core { // @todo support "keywords", "originationTimestamp", and "random" sort orders. $order_map = array( + "originationTimestamp" => "captured", "creationTimestamp" => "created", "description" => "description", "modificationTimestamp" => "updated", @@ -223,7 +224,6 @@ class g2_import_Core { self::set_map($g2_album_id, $album->id); - // @todo import origination timestamp // @todo import keywords as tags // @todo import album highlights } @@ -304,6 +304,8 @@ class g2_import_Core { ($derivative->getWidth() == $target_thumb_size || $derivative->getHeight() == $target_thumb_size)) { copy(g2($derivative->fetchPath()), $item->thumb_path()); + $item->thumb_height = $derivative->getHeight(); + $item->thumb_width = $derivative->getWidth(); $item->thumb_dirty = false; } @@ -312,6 +314,8 @@ class g2_import_Core { ($derivative->getWidth() == $target_resize_size || $derivative->getHeight() == $target_resize_size)) { copy(g2($derivative->fetchPath()), $item->resize_path()); + $item->resize_height = $derivative->getHeight(); + $item->resize_width = $derivative->getWidth(); $item->resize_dirty = false; } } -- cgit v1.2.3