diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-05-10 01:11:16 +0000 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-05-10 01:11:16 +0000 |
commit | 0872cce1ea218865230f3f0f09d2fbcb6895205f (patch) | |
tree | aa8fc36820b78053b7e424d78e9b73868b3f24b7 | |
parent | 99b7cdeee1713939d739435de1997149a4ceb886 (diff) |
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.
-rw-r--r-- | modules/g2_import/helpers/g2_import.php | 6 |
1 files changed, 5 insertions, 1 deletions
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; } } |