summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2011-05-02 21:36:17 -0700
committerBharat Mediratta <bharat@menalto.com>2011-05-02 21:36:17 -0700
commit68370b92f5f6fa68744655f8c68b4b0ca59bf4fd (patch)
tree96505e7f895bc5d0a5346707809cd25544c1a3b9 /modules
parent97400b78153620262120868b37545170416413c9 (diff)
Map the G2 album highlight thumbnail derivative id to the G3 album's
thumbnail. Fixes #1729.
Diffstat (limited to 'modules')
-rw-r--r--modules/g2_import/helpers/g2_import.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/g2_import/helpers/g2_import.php b/modules/g2_import/helpers/g2_import.php
index 3606c7ef..c79a8d36 100644
--- a/modules/g2_import/helpers/g2_import.php
+++ b/modules/g2_import/helpers/g2_import.php
@@ -560,7 +560,7 @@ class g2_import_Core {
$table = g2(GalleryCoreApi::fetchThumbnailsByItemIds(array($g2_album_id)));
if (isset($table[$g2_album_id])) {
// Backtrack the source id to an item
- $g2_source = $table[$g2_album_id];
+ $orig_g2_source = $g2_source = $table[$g2_album_id];
while (GalleryUtilities::isA($g2_source, "GalleryDerivative")) {
$g2_source = g2(GalleryCoreApi::loadEntitiesById($g2_source->getDerivativeSourceId()));
}
@@ -584,6 +584,11 @@ class g2_import_Core {
array("name" => $g3_album->name)),
$e);
}
+
+ self::set_map(
+ $orig_g2_source->getId(), $g3_album->id,
+ "thumbnail",
+ self::g2_url(array("view" => "core.DownloadItem", "itemId" => $orig_g2_source->getId())));
}
}
}