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.
This commit is contained in:
Bharat Mediratta
2009-05-10 01:11:16 +00:00
parent 99b7cdeee1
commit 0872cce1ea
+5 -1
View File
@@ -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;
}
}